-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Migration from 0.12 -> 0.13 #2159
Comments
hey, can you elaborate a bit more what you eventually did to migrate (the also, not sure I understood the not sure I like the idea of wiring the tool and the controller together with a flag, as if there is a "native" k8s way to achieve it and we document it properly it might be nicer, but ofc I'm open to hearing. |
Agree with @oribon on understanding what are the details we missed when writing the tool. Iirc from our discussion, naming was one of the issues. I am open to have the migration integrated as some part of MetalLB, but what I'd do is to flip the flag and always enable it (maybe if it finds the configmap and all the CRs are empty)? So the users would've to opt out instead of opting in. |
Sure, I can also upload the code in it's not so pretty form that we used for the migration process. The couple issues we had were.
The automatic wrapper basically just pulled the configmap, then generated the new objects and applied them to the cluster via the same k8s client the rest of metallb uses. |
Created a draft PR to showcase the changes btw in #2172 |
Hi, sorry this took a while. This approach is mostly about making a process that is supposed to be "one-time" (converting the config) to become a continuous one and as a side-effect each time the controller resets it would rewrite the crds.
In general, given the conversion work is a one shot activity, external to the controller's purpose, would adjusting the configmaptocrs tool to be able to apply the resources directly \ expose the resources it produces help? The race condition is probably a non issue since the controller does not read the configMap and would eventually converge with the given resources. |
Sorry also for the late response @oribon 😆 Yeah a sidecar container or a k8s job would probably be the ideal way to do this. In our case we have full control over when the flag gets enabled and keep it around for one version only so that method sufficed. We could probably do something like #2152 for the conversion. Does it make sense to have the configmaptocr runner use a kubernetes client rather than stdin stdout? In that case we could run this job as a one shot and then be sure that we have migrated. I can look into doing this and having the configmaptocr be a separate container that can be run on the cluster. |
Seems good to me, thanks! |
Is your feature request related to a problem?
Our team ran into issues migrating metallb from 0.12 to 0.13. In our case, it wasn't feasible to run the configmaptocr tool because this would require manual work for every cluster that was using metallb 0.12. This lead to us being stuck at metallb 0.12 for far longer than we wanted to. When we finally upgraded to 0.13, it took a decent bit of work to migrate all of our config to crds. We had to create an automatic wrapper around the configmaptocr tool and have it run prior to starting controllers.
Describe the solution you'd like
Enable an additional flag to metallb controller
--run-migration
that prior to running the controller runs a migration process. This is very similar to what the configmaptocr process does, but actually works on the cluster that metallb runs on. Modify configmaptocrs slightly to ensure that no matter what, we always get valid, unique CRs upon migration.Additional context
I already have an implementation of this internally, but would probably need some polish to upstream. Want to gauge interest on this feature and see if it's something that would be wanted.
I've read and agree with the following
The text was updated successfully, but these errors were encountered: