-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Remove unneeded node groups regardless of scale down being in cooldown. #5901
Conversation
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
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.
/assign
Looks good, just one comment.
if err != nil { | ||
klog.Errorf("Error while removing unneeded node groups: %v", err) | ||
} | ||
scaleDownStatus.RemovedNodeGroups = removedNodeGroups |
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.
I think this makes line 653 no-op now.
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.
I don't think so, as in line 648 we are overwriting scaleDownStatus
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.
Ah, good point. This function is way too long 😞
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olagacek, x13n The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…of scale down being in cooldown into CA1.26
…of scale down being in cooldown into CA1.27
…am-cluster-autoscaler-release-1.26 Backport #5901 [CA] Remove unneeded node groups regardless of scale down being in cooldown into CA1.26
…am-cluster-autoscaler-release-1.27 Backport #5901 [CA] Remove unneeded node groups regardless of scale down being in cooldown into CA1.27
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently unneeded node groups are deleted only if scale down isn't in cooldown, so in particular if there was a scale up in a given loop, no unneeded node group will get deleted. There are certain scenarios in which that might turn out problematic - eg if scale up fails in every loop, the node groups won't be deleted for a long time. At the same time, unneeded node groups might affect scale up failures (e.g. quota issues).
Due to that, we can decouple unneeded node group deletion from the rest of scale down logic.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: