[AKS] az aks nodepool add/update/upgrade: Add new parameter --undrainable-node-behavior to specify whether nodes can be cordoned during upgrade#31495
Conversation
️✔️AzureCLI-FullTest
|
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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 the new parameter undrainable_node_behavior to allow customers to specify whether nodes should be cordoned or scheduled during an upgrade. The changes include the addition of a new test case to verify the behavior, modifications in custom code and agentpool decorators to propagate the new parameter, and updates to parameter definitions and help documentation.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/latest/test_aks_commands.py | Adds a new test case for nodepool undrainable node behavior |
| custom.py | Updates functions to accept and propagate undrainable_node_behavior |
| agentpool_decorator.py | Adds getter and updates upgrade settings for undrainable_node_behavior |
| _params.py | Adds a new argument for undrainable_node_behavior |
| _help.py | Updates help documentation to include the new parameter |
FumingZhang
left a comment
There was a problem hiding this comment.
Queued live test to validate the change
- test_aks_nodepool_undrainable_node_behavior
|
Please fix failed CI checks |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
live test failed with the following error
|
|
Requeued live test, test passed! |
az aks nodepool add/update/upgrade: Add new parameter --undrainable-node-behavior to specify whether nodes can be cordoned during upgrade
Related command
az aks nodepool add/update/upgrade --undrainable-node-behavior
Description
Bringing preview change Azure/azure-cli-extensions#7971 to stable.
Allows customers to specify node behavior for a node during upgrades, i.e. 'Cordon' or 'Schedule' for a node during upgrade.
This was added to the 2025-03-01 API by Azure/azure-rest-api-specs#34176.
Testing Guide
$ az aks create -g my-resource-group -n UpgradeTestCluster
$ az aks nodepool update -n nodepool1 -g my-resource-group --cluster-name UpgradeTestCluster --undrainable-node-behavior Cordon
$ az aks upgrade -g my-resource-group -n UpgradeTestCluster -k 1.27.1
History Notes
[AKS]
az aks nodepool add/update/upgrade: Add new parameter--undrainable-node-behaviorto specify whether nodes can be cordoned 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.