kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
7.98k stars 3.94k forks source link

Unable to make use of least-nodes expander in the autoscaler #7200

Open Kaikj opened 1 month ago

Kaikj commented 1 month ago

Which component are you using?: Cluster Autoscaler

What version of the component are you using?: The bug exists in the master branch

Component version:

What k8s version are you using (kubectl version)?: The version of kubectl does not matter

kubectl version Output
$ kubectl version

What environment is this in?: This affects all environments as the bug is in the code

What did you expect to happen?: The least-nodes expander to be selected after choosing it

What happened instead?: The least-nodes expander is not part of the set of available expanders

How to reproduce it (as minimally and precisely as possible): Simply try to make use of least-nodes expander.

The least nodes expander introduced in https://github.com/kubernetes/autoscaler/pull/6792 did not add the expander into the list of Available Expanders. The easy fix would be to simply add it in but I cannot be sure if it is intended to be left out for now or if it has just been missed out.

Happy to open a PR for this if it helps. The bug occurs in https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/expander.go

Anything else we need to know?:

adrianmoisey commented 1 month ago

/area cluster-autoscaler

areeba-anwar commented 2 weeks ago

Environment: This issue affects all environments since the bug exists within the code itself.

Expected Behavior: After selecting the least-nodes expander, it should be available as an option.

Actual Behavior: The least-nodes expander is missing from the list of available expanders.

Steps to Reproduce:

Attempt to use the least-nodes expander. Observe that it does not appear in the set of available expanders.