[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
Conversation
|
Hi @Jenniferyingni, |
️✔️AzureCLI-FullTest
|
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
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. |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 31510 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Queued live test to validate the change, test passed!
- test_aks_nodepool_max_unavailable
|
Please fix failed CI check Azure.azure-cli (Check the Format of Pull Request Title and Content) |
az aks nodepool add/update/upgrade: Add --max-unavailable to commandsaz aks nodepool add/update/upgrade: Add --max-unavailable to commands
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
az aks nodepool add/update/upgrade: Add --max-unavailable to commandsaz aks nodepool add/update/upgrade: Add --max-unavailable to specify he maximum number or percentage of nodes that can be simultaneously unavailable during upgrade
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-unavailableto specify he maximum number or percentage of nodes that can be simultaneously unavailable during upgradeThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.