-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix HasHighlyAvailableControlPlane to use AllInstanceGroups #17740
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
base: master
Are you sure you want to change the base?
Fix HasHighlyAvailableControlPlane to use AllInstanceGroups #17740
Conversation
|
|
|
Welcome @pkubicsek-sb! |
|
Hi @pkubicsek-sb. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[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 |
05cbb11 to
c3189b5
Compare
When using 'kops update cluster' with --instance-group or --instance-group-roles filters, the HasHighlyAvailableControlPlane function was incorrectly using the filtered InstanceGroups list instead of AllInstanceGroups. This caused cluster-wide controllers like aws-load-balancer-controller and node-termination-handler to incorrectly downscale replicas from 2 to 1 when updating a specific instance group in an HA cluster. The fix changes HasHighlyAvailableControlPlane to use AllInstanceGroups since HA status is a cluster-wide property, not specific to filtered instance groups. Signed-off-by: Peter Kubicsek <peter.kubicsek@happening.xyz>
c3189b5 to
e6786c2
Compare
|
Thanks for looking into this @pkubicsek-sb. |
What this PR does / why we need it:
Fixes a bug where
HasHighlyAvailableControlPlane()incorrectly uses the filteredInstanceGroupslist instead ofAllInstanceGroups. This causes cluster-wide controllers (aws-load-balancer-controller, node-termination-handler, etc.) to incorrectly downscale from 2 to 1 replica when runningkops update clusterwith--instance-groupor--instance-group-rolesfilters on HA clusters.The fix changes the function to use
AllInstanceGroupssince HA status is a cluster-wide property that should not depend on instance group filtering.Which issue(s) this PR fixes:
Fixes #17739
Special notes for your reviewer:
--instance-groupor--instance-group-rolesflagstemplate_functions.go:502