[AKS] az aks upgrade: Support tier switch with AKS upgrade#9785
[AKS] az aks upgrade: Support tier switch with AKS upgrade#9785m-chau wants to merge 19 commits intoAzure:mainfrom
Conversation
Adds support for changing the SKU tier and Kubernetes support plan during cluster upgrade. Includes LTS validation requiring Premium tier.
Adds support for changing the SKU tier and Kubernetes support plan during cluster upgrade. Includes LTS validation requiring Premium tier.
…m/m-chau/azure-cli-extensions into feature/upgrade-tier-support-plan
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks upgrade | cmd aks upgrade added parameter k8s_support_plan |
||
| aks upgrade | cmd aks upgrade added parameter tier |
|
Hi @m-chau, |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for switching AKS SKU tier and Kubernetes support plan during az aks upgrade, enabling entry/exit from AKS Long Term Support (LTS) as part of an upgrade operation.
Changes:
- Adds
--tierand--k8s-support-planparameters toaz aks upgrade. - Updates upgrade logic to apply/support-plan + tier switching and validates LTS requires Premium tier.
- Adds a live test covering tier/support-plan switching during upgrade.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/azext_aks_preview/custom.py | Applies --tier / --k8s-support-plan during upgrade and validates LTS↔tier constraints. |
| src/aks-preview/azext_aks_preview/_params.py | Wires new parameters into aks upgrade argument definitions. |
| src/aks-preview/azext_aks_preview/_help.py | Documents new CLI flags for aks upgrade. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Adds test + helper methods to exercise tier/support-plan switching during upgrade. |
| src/aks-preview/HISTORY.rst | Notes new az aks upgrade flags in changelog. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
…ds.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
…ds.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
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>
|
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
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 |
|
Hi @m-chau Release SuggestionsModule: aks-preview
Notes
|
|
|
||
| @AllowLargeResponse() | ||
| @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') | ||
| def test_aks_upgrade_with_tier_switch(self, resource_group, resource_group_location): |
There was a problem hiding this comment.
@FumingZhang Undo some copilot suggestions and the PR gate tests have passed :)
There was a problem hiding this comment.
the previous live test run failed with error
self.assertIn("AKSLongTermSupport", fail_upgrade_result.error)^^^^^^^^^^^^^^^^^^^^^^^^^E AttributeError: 'ExecutionResult' object has no attribute 'error'
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks upgradeDescription
Adding options
--tierand--k8s-support-planto az aks upgrade command to support enable/disable AKSLongTermSupport with upgrade operation.For example, if a cluster is currently on out-of-support version 1.29, they can upgrade to 1.30 LTS with command:
az aks upgrade -g myResourceGroup -n myCluster -k 1.30--tier Premium --k8s-support-plan AKSLongTermSupportSimilarly, to exit LTS for clusters on 1.34 that are still in community support, they can do:
az aks upgrade -g myResourceGroup -n myCluster -k 1.35 --tier Standard --k8s-support-plan KubernetesOfficialThe feature is actually in GA with Azure/azure-cli#29448. Thie PR backports it to preview CLI to algin behavior between preview extension and GA.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.