-
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
Add option to skip similar nodegroup recomputation #6926
base: master
Are you sure you want to change the base?
Add option to skip similar nodegroup recomputation #6926
Conversation
Hi @rrangith. Thanks for your PR. I'm waiting for a kubernetes 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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
32774c7
to
450a753
Compare
450a753
to
35c514d
Compare
/remove-lifecycle stale |
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.
there had been some discussions about trying to limit the new flags we are adding to the autoscaler, but i'm not sure if there was ever any guidance about that. regardless, i think this new flag should also be mentioned in the FAQ, see https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca
35c514d
to
2627751
Compare
just a question as i'm reviewing, is there any relationship or interaction between this flag and the balance-similar-node-groups flag? (eg does the latter need to be enabled or anything special like that) |
There is no strict relationship between the 2 flags for things to function properly, however if you enable I was debating mentioning that in the FAQ or cli arg description, but wasn't sure if I should add even more words to it |
i think it's worth mentioning, if only so people know they need to have |
2627751
to
0a2c91f
Compare
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
we will need a review from a core maintainer for the flag change.
0a2c91f
to
3f9efa1
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rrangith 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 |
/test pull-cluster-autoscaler-e2e-azure-master |
newNodes int, | ||
nodeInfos map[string]*framework.NodeInfo, | ||
schedulablePodGroups map[string][]estimator.PodEquivalenceGroup, | ||
) ([]nodegroupset.ScaleUpInfo, errors.AutoscalerError) { | ||
// Recompute similar node groups in case they need to be updated | ||
similarNodeGroups := o.ComputeSimilarNodeGroups(nodeGroup, nodeInfos, schedulablePodGroups, now) | ||
similarNodeGroups := bestOption.SimilarNodeGroups |
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.
It does seem like we're reliably populating bestOption.SimilarNodeGroups
as part of the flow before invoking this balanceScaleUps
method (L148 where we invoke o.ComputeExpansionOption
).
That said, do we want to do some checking here, to make sure we have a good default value if "skip similar nodegroup recomputation" is enabled?
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 dont think there is a good default value since my thinking with this feature was to fully rely on what the expander deems as the similar nodegroups here. So for example if the bestOption is nodegroup A, and it has similar nodegroups B and C, but the expander removes both B and C as similar nodegroups, then CA should respect that and only scaleup nodegroup A
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.
makes sense, thx
What type of PR is this?
/kind feature
What this PR does / why we need it:
Related to #6940
This recomputation used to only occur when the bestOption NodeGroup did not exist, but was changed in #5802. There are cases where an expander could modify the bestOption's similar nodegroups, such as custom logic in the gRPC expander.
In cases like this, we should have a CLI option to trust expander’s similar nodegroups and skip the recomputation.
If a user does not enable this option, then by default the behaviour will stay the same. This will only skip similar nodegroup recomputation for users who enable this option.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: