-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
WIP Allow updating the cluster one instance group at a time #16922
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -285,24 +306,75 @@ func RunUpdateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Up | |||
lifecycleOverrideMap[taskName] = lifecycleOverride | |||
} | |||
|
|||
list, err := clientset.InstanceGroupsFor(cluster).List(ctx, metav1.ListOptions{}) |
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.
Nit: might be nice to split this into a function?
Remind me - I think you said there's a gotcha with this approach @hakman ? |
Looked at this for a while, and I think I know what is happening! So the issue is:
We store the instanceGroup as the user specified it. But there are many computed fields - the so called "full" instanceGroup or cluster spec. upgradeSpecs converts the instanceGroups to populate these fields. In this PR, we aren't calling upgradeSpecs or the population logic. So these instance groups don't have many fields populated, including (I would guess) the kubelet config. I suggest that the easy thing to do is to convert |
Applying a predicate does seem to work ... https://github.com/justinsb/kops/tree/update-cluster-per-ig The problem is that I don't think we can just do ASGs. Even on AWS, we need to deal with NodeTerminationHandler object. But I think this problem also exists on other clouds, so we need to solve it there also IIUC |
I opened another PR #16936 with the filter. I also had to do something similar to what you did - all tasks have access to InstanceGroups (the filtered instance groups) and AllInstanceGroups (unfiltered). The "trick" is that most tasks work with "InstanceGroups" (the filtered), there are just a handful that need to be repointed to work with AllInstanceGroups (e.g. things that need a list of roles) Likely we'll need a few tweaks for other clouds, but they shouldn't be too big! |
Awesome! 🎉 |
/cc @justinsb @rifelpet