Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

Cannot set `expander` with multiple parameter in aks cluster autoscaler profile #29379

Open JoeyC-Dev opened 4 months ago

JoeyC-Dev commented 4 months ago

Describe the bug

Cannot set expander with multiple parameter in aks cluster autoscaler profile

Related command

az aks update -n ${aks} -g ${rG} -o none \
--cluster-autoscaler-profile expander=priority,least-waste

Errors

'least-waste' is an invalid key for cluster-autoscaler-profile. Valid keys are balance-similar-node-groups, expander, max-empty-bulk-delete, max-graceful-termination-sec, max-node-provision-time, max-total-unready-percentage, new-pod-scale-up-delay, ok-total-unready-count, scan-interval, scale-down-delay-after-add, scale-down-delay-after-delete, scale-down-delay-after-failure, scale-down-unneeded-time, scale-down-unready-time, scale-down-utilization-threshold, skip-nodes-with-local-storage, skip-nodes-with-system-pods.

Issue script & Debug output

I don't think this is needed.

Expected behavior

It should be supported to be configured via azure-cli.

Environment Summary

{
  "azure-cli": "2.61.0",
  "azure-cli-core": "2.61.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "ai-examples": "0.2.5",
    "ml": "2.26.1",
    "ssh": "2.0.3"
  }
}

Additional context

In the official FAQ, it is stated that multiple parameters are supported for expander. E.g: --expander=priority,least-waste.
src: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders

It is also possible to be done via ARM template. And I can see the result: image

az aks show -n ${aks} -g ${rG} --query autoScalerProfile.expander
"priority,least-waste"

However, it is not possible to be done via az-cli for now as it needs to inlcude ,.

Also tried the following command, no use:

joey [ ~ ]$ az aks update -n ${aks} -g ${rG} -o none \
--cluster-autoscaler-profile expander=priority,expander=least-waste
joey [ ~ ]$ az aks show -n ${aks} -g ${rG} --query autoScalerProfile.expander
"least-waste"

Alternative solution considered: Support json format as input.

azure-client-tools-bot-prd[bot] commented 4 months ago

Hi @JoeyC-Dev,

2.61.0 is not the latest Azure CLI(2.62.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 4 months ago

Thank you for opening this issue, we will look into it.

JoeyC-Dev commented 4 months ago

@yonzhan Hi, this issue looks like being auto resolved and being assigned with no one. Can you help on that?

yonzhan commented 4 months ago

Adding @FumingZhang to help with

FumingZhang commented 4 months ago

Taking a look

kevinkrp93 commented 4 months ago

@JoeyC-Dev - FYI - even with the change in CLI, the AKS CAS doesn't support multiple expander functionality just yet

JoeyC-Dev commented 4 months ago

@JoeyC-Dev - FYI - even with the change in CLI, the AKS CAS doesn't support multiple expander functionality just yet

That is a surprise. Thank you for the reminding.

JoeyC-Dev commented 4 months ago

@kevinkrp93 Hi, this morning I find this Github issue:

After checking the commit, it looks like "priority,least-waste" is being used as a test example. I am not sure about the code part, but does that mean the multiple expander functionality will be available after this PR being merged?