-
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 least-nodes expander to cluster-autoscaler #6792
add least-nodes expander to cluster-autoscaler #6792
Conversation
Hi @com6056. 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. |
/kind feature |
@@ -37,6 +37,7 @@ func (m *mostpods) BestOptions(expansionOptions []expander.Option, nodeInfo map[ | |||
for _, option := range expansionOptions { | |||
if len(option.Pods) == maxPods { | |||
maxOptions = append(maxOptions, option) | |||
continue |
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.
tiny little perf improvement
498cd03
to
fa19529
Compare
fa19529
to
dc99ab3
Compare
You can write/run your own expanders using the grpc expander option: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/expander/grpcplugin My personal opinion is that it's better for users to add new expanders using this approach, rather than adding more special-case expanders into the core autoscaler code. |
I generally agree with @drmorr0, but this expander seems both simple and very generic (*). As such I can imagine it being useful enough for many other users, so personally I'm ok letting it in. (*) Preference for large nodes is a reasonable high-level strategy, as larger nodes suffer less from "system tax" and resource fragmentation. In small clusters the downside may be lack of HA, but for a cluster with hundreds of nodes I think it is a decent strategy. And there is nothing specific to a provider or environment in the implementation, it will work anywhere as the only input it relies on is absolutely necessary for CA to be able to scale-up at all. edit: Specifically - I'm ok to lgtm this once the review comments are addressed. |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: com6056, MaciekPytel 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 |
/cherrypick cluster-autoscaler-release-1.27 |
@com6056: only kubernetes org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually. In response to this:
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. |
@MaciekPytel would you be able to run the cherry-pick command for me? Thanks! 🙏 |
Would very much like to utilize this expander. Currently our similar node groups spread across AZ's are unevenly scaled. Always bumping the pool that has fewer nodes seams like the easiest logic to keep them all relatively equal. |
Also looking to use this, any chance it could get into a release soon? |
…st-nodes add least-nodes expander to cluster-autoscaler
…st-nodes add least-nodes expander to cluster-autoscaler
…st-nodes add least-nodes expander to cluster-autoscaler
…st-nodes add least-nodes expander to cluster-autoscaler
cherry-pick least-nodes expander from #6792 into 1.30
cherry-pick least-nodes expander from #6792 into 1.29
cherry-pick least-nodes expander from #6792 into 1.28
What type of PR is this?
What this PR does / why we need it:
Adds a new
least-nodes
expander 🎉Which issue(s) this PR fixes:
No related issues
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: