-
Notifications
You must be signed in to change notification settings - Fork 1.5k
{aks}: Add support for basic lb migration #8731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks update | cmd aks update added parameter load_balancer_sku |
|
Hi @MartinForReal, |
|
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>
|
|
|
related: Azure/AKS#1687 |
There was a problem hiding this 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 introduces support for migrating from Basic to Standard Azure Load Balancer SKU in AKS commands and decorators.
- Add a new
--load-balancer-skuparameter foraks updateand update decorators to apply the SKU change. - Extend unit and integration tests to cover creating with Basic LB and updating to Standard LB.
- Update CLI parameter registration, help documentation, version bump, and changelog.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/setup.py | Bump extension version to 18.0.0b3 |
| src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py | Add blank lines cleanup and migration unit test for update |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Add E2E test for Basic→Standard LB migration; adjust vm-set-type casing |
| src/aks-preview/azext_aks_preview/managed_cluster_decorator.py | Introduce _get_load_balancer_sku and apply SKU in update flow |
| src/aks-preview/azext_aks_preview/custom.py | Expose load_balancer_sku in aks_update signature |
| src/aks-preview/azext_aks_preview/_params.py | Register load_balancer_sku enum (currently only "standard") |
| src/aks-preview/azext_aks_preview/_help.py | Document --load-balancer-sku parameter |
| src/aks-preview/HISTORY.rst | Add changelog entry for basic LB migration |
Comments suppressed due to low confidence (4)
src/aks-preview/azext_aks_preview/_params.py:1001
- The enum for
load_balancer_skuonly allowsstandard, preventing passingbasicwhen creating with Basic LB. IncludeCONST_LOAD_BALANCER_SKU_BASICin the choices or separate parameter registration for create vs. update commands.
c.argument("load_balancer_sku", arg_type=get_enum_type([CONST_LOAD_BALANCER_SKU_STANDARD]),
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:367
- [nitpick] The vm-set-type value
availabilitysetshould match the canonical casingavailabilitySetorVirtualMachineScaleSetsto avoid confusion and align with other tests.
--vm-set-type availabilityset -c 1
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py:350
- You added
_get_load_balancer_skuto the decorator class, butupdate_network_profilecallsself.context.get_load_balancer_sku(). Implementget_load_balancer_skuon the context class or route calls correctly to avoid anAttributeErrorat runtime.
def _get_load_balancer_sku(self, enable_validation: bool = False) -> Union[str, None]:
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py:4301
- [nitpick] There are two consecutive blank lines before
def test_set_up_api_server_access_profile. Remove one to match project style guidelines.
+
There was a problem hiding this 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_create_with_basiclb_and_update_to_standardlb
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py
Outdated
Show resolved
Hide resolved
|
Please fix the failed CI checks |
FumingZhang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
live test passed!
|
[Release] Update index.json for extension [ aks-preview-18.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=125122846&view=results |
* add support for basic lb migration * add support for basic lb migration
|
Is this already available on AZ CLI 2.74-0? Didn't see any mention on the release notes... |
|
@sata-sa The feature is still in preview. So the cli change is only available in aks-preview extension. |
|
@sata-sa, please register feature Microsoft.ContainerService/BasicLBMigrationToStandardLBPreview first. The doc is still under preview. |
|
@MartinForReal With around 3.5 months to go untill deprecation of the basic LB, any estimate when the first stable release will be? |
|
I've left Azure. The feature will be announced soon. Please stay tunned. |

This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az update
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.