-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to configure machine config pools #50
Conversation
1e19373
to
468e1d7
Compare
OpenShift doesn't really look at the labelselector of the pool and just assumes that it matches labels with the name
e33ce07
to
48a5552
Compare
96469a6
to
152b4ca
Compare
152b4ca
to
eb74e82
Compare
I will add a how to explaining some of the ways to use machine pool configs and some pitfalls in a separate PR. But I'd like to have a general review of the component first. Also this change will most likely cause all worker nodes to reboot one after another as OpenShift somehow doesn't understand that the machine config did not actually change. Should we mark this as breaking, as this should be released during a maintenance window? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with the std.prune
addressed as discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, take or leave the suggestions on how we could reduce code duplication, it's not that problematic here.
Generally speaking, I feel like the implementation for containerruntimeconfigs and kubeletconfigs is just cryptic enough that it would greatly benefit from short comments explaining what's happening. As it is, it took me a while to figure out what the code is doing (I actually read the parameter docs before going back to reviewing the code)
Did a bunch of refactoring and removed some magic. I hope this is no a bit more readable. |
local machineConfig = std.foldl( | ||
function(configs, name) | ||
local pool = params.machineConfigPools[name]; | ||
local machineConfigSpecs = std.get(pool, 'machineConfigs', default={}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires Jsonnet 0.18.0, which is probably fine at this point (at least my local Commodore install has Jsonnet 0.18.0)
Co-authored-by: Simon Gerber <simon.gerber@vshn.ch>
I think I'm in favor of making this a new major version, to clearly signal that it needs special care (and to ensure Renovate doesn't auto-update the VSHN defaults) |
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog.