{AKS} Add --control-plane-scaling-size parameter to az aks update#9836
{AKS} Add --control-plane-scaling-size parameter to az aks update#9836nethbtju wants to merge 1 commit intoAzure:mainfrom
Conversation
Add support for updating the control plane scaling size on existing clusters via az aks update --control-plane-scaling-size. Users can upgrade or downgrade between H2, H4, and H8 sizes on clusters that were created with a control plane scaling profile. Server-side RP handles all validation.
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks update | cmd aks update added parameter control_plane_scaling_size |
|
Hi @nethbtju, |
|
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>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
There was a problem hiding this comment.
Pull request overview
Adds support in the aks-preview extension for updating an existing AKS cluster’s control plane scaling size via az aks update --control-plane-scaling-size (with --cp-scaling-size alias), wiring the new argument through the update decorator so it’s sent to the RP.
Changes:
- Added
--control-plane-scaling-size/--cp-scaling-sizetoaz aks updatearguments and plumbed it intoaks_update(...). - Implemented
update_control_plane_scaling_profile(...)in the AKS preview update decorator and invoked it fromupdate_mc_profile_preview(). - Added/extended unit + live integration tests to cover upgrade/downgrade/no-op scenarios and documented the feature in
HISTORY.rst.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/azext_aks_preview/_params.py | Introduces the new update argument and constrains values to H2/H4/H8. |
| src/aks-preview/azext_aks_preview/custom.py | Adds control_plane_scaling_size to aks_update() so it flows into the decorator raw params. |
| src/aks-preview/azext_aks_preview/managed_cluster_decorator.py | Updates the managed cluster update flow to apply the scaling size into control_plane_scaling_profile. |
| src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py | Adds unit coverage for update behavior across no-op/upgrade/downgrade/profile-absent cases. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Extends the live scenario test to validate update upgrade/downgrade after create. |
| src/aks-preview/HISTORY.rst | Adds a pending changelog entry for the new aks update parameter. |
|
Hi @nethbtju Release SuggestionsModule: aks-preview
Notes
|
FumingZhang
left a comment
There was a problem hiding this comment.
lgtm
Can you provide a link to passed live test to prove the change works as expected?
Description
Add support for updating the control plane scaling size on existing AKS clusters via
az aks update --control-plane-scaling-size.Users can upgrade or downgrade between
H2,H4, andH8sizes on clusters that were created with a control plane scaling profile enabled. The CLI acts as a thin passthrough — all business logic validation (e.g., rejecting updates on non-CPSP clusters, preventing removal of CPSP) is handled server-side by the RP.Changes
_params.py: Added--control-plane-scaling-size/--cp-scaling-sizeparameter toaks updatecontextcustom.py: Addedcontrol_plane_scaling_sizeparameter toaks_update()functionmanaged_cluster_decorator.py: Addedupdate_control_plane_scaling_profile()method toAKSPreviewManagedClusterUpdateDecorator, wired intoupdate_mc_profile_preview()test_managed_cluster_decorator.py: Added unit tests covering no-op, upgrade (H4→H8), downgrade (H8→H2), and passthrough when no profile existstest_aks_commands.py: Extended integration test to cover update (upgrade and downgrade) after createHISTORY.rst: Added pending changelog entryTesting
test_update_control_plane_scaling_profile(4 cases)test_aks_create_with_control_plane_scaling_profile(extended with update steps)