Skip to content

[AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to specify he maximum number or percentage of nodes that can be simultaneously unavailable during upgrade#31510

Merged
zhoxing-ms merged 7 commits intoAzure:devfrom
Jenniferyingni:zyn/maxunavailable
May 23, 2025

Conversation

@Jenniferyingni
Copy link
Copy Markdown
Member

@Jenniferyingni Jenniferyingni commented May 19, 2025

Related command
az aks nodepool add/update/upgrade --max-unavailable

Description
GA feature maxUnavailable, When customer does not have any extra SKU capacity or quota (typically those using specialty GPU SKUs), they should be able to upgrade nodes without using a surge node.

Testing Guide
az aks nodepool add --max-unavailable
az aks nodepool update --max-unavailable
az aks nodepool upgrade --max-unavailable

History Notes

[AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to specify he maximum number or percentage of nodes that can be simultaneously unavailable during upgrade


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings May 19, 2025 19:01
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @Jenniferyingni,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented May 19, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented May 19, 2025

❌AzureCLI-BreakingChangeTest
❌acs
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks nodepool add cmd aks nodepool add update parameter spot_max_price: updated property default from nan to nan please change property default from nan to nan for parameter spot_max_price of cmd aks nodepool add
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter max_unavailable
⚠️ 1006 - ParaAdd aks nodepool update cmd aks nodepool update added parameter max_unavailable
⚠️ 1006 - ParaAdd aks nodepool upgrade cmd aks nodepool upgrade added parameter max_unavailable

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a new parameter (--max-unavailable) to the aks nodepool add, update, and upgrade commands.

  • Added a new namespace class and associated tests for max_unavailable validation.
  • Updated command implementations and parameter validations in custom logic, decorators, and parameter definitions.
  • Extended help documentation to include --max-unavailable details.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py Added MaxUnavailableNamespace class and tests for validating max_unavailable values.
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py Added tests to cover the usage of --max-unavailable in nodepool add and update commands.
src/azure-cli/azure/cli/command_modules/acs/custom.py Updated functions to accept and process the new max_unavailable parameter, including enhanced error messages.
src/azure-cli/azure/cli/command_modules/acs/agentpool_decorator.py Added getter function get_max_unavailable and incorporated max_unavailable in upgrade settings updates.
src/azure-cli/azure/cli/command_modules/acs/_validators.py Introduced validate_max_unavailable to enforce valid values for the parameter.
src/azure-cli/azure/cli/command_modules/acs/_params.py Registered the new parameter in argument loading for multiple commands.
src/azure-cli/azure/cli/command_modules/acs/_help.py Provided help entries for --max-unavailable in relevant command contexts.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 19, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@Jenniferyingni
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 31510 in repo Azure/azure-cli

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 19, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queued live test to validate the change, test passed!

  • test_aks_nodepool_max_unavailable

@FumingZhang
Copy link
Copy Markdown
Member

@Jenniferyingni Jenniferyingni changed the title [AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to commands [AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to commands May 20, 2025
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

FumingZhang
FumingZhang previously approved these changes May 20, 2025
Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/azure-cli/azure/cli/command_modules/acs/_validators.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/acs/_validators.py Outdated
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@zhoxing-ms zhoxing-ms changed the title [AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to commands [AKS] az aks nodepool add/update/upgrade: Add --max-unavailable to specify he maximum number or percentage of nodes that can be simultaneously unavailable during upgrade May 23, 2025
@zhoxing-ms zhoxing-ms merged commit cb14a97 into Azure:dev May 23, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants