[AKS] Relax validation so apiserver_subnet_id is not required during non-HOBO to HOBO conversion - #10227
Conversation
|
Hi reneeli123, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
apiserver_subnet_id is not required during non-HOBO to HOBO conversion
There was a problem hiding this comment.
Pull request overview
This PR updates the aks-preview extension’s az aks update hosted-system (HOBO) conversion flow to relax bring-your-own VNet subnet validation: --apiserver-subnet-id is no longer required during non-HOBO → HOBO conversion, and --enable-hosted-system must be specified explicitly to request the conversion.
Changes:
- Adjust hosted-system enablement and BYO subnet cross-validation logic for UPDATE vs CREATE flows.
- Update help text/examples to reflect the new conversion requirements and optional subnet behavior.
- Update unit tests, bump extension version, and add a changelog entry for the change.
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 |
|---|---|
| src/aks-preview/setup.py | Bumps extension version to 22.0.0b2. |
| src/aks-preview/HISTORY.rst | Adds release notes for 22.0.0b2 describing the relaxed validation. |
| src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py | Updates/expands tests to cover explicit conversion request and optional subnet combinations. |
| src/aks-preview/azext_aks_preview/managed_cluster_decorator.py | Updates conversion enablement rules and BYO subnet validation behavior for update-mode conversions. |
| src/aks-preview/azext_aks_preview/_help.py | Updates parameter descriptions and examples for the new subnet/conversion semantics. |
Suppressed comments (1)
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py:4376
- Similar to the prior message, this SKU error message implies both subnet flags are present ("--system-node-subnet-id" and "--node-subnet-id"). Since the UPDATE validation is triggered when either subnet flag is used, consider wording the message to reflect that either flag is only supported for Automatic SKU clusters.
if self.get_sku_name() != CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
raise RequiredArgumentMissingError(
'"--system-node-subnet-id" and "--node-subnet-id" are only supported on '
"clusters with the Automatic SKU."
)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
fc0f19b to
637abc0
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ aks-preview-22.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=177571026&view=results |
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks update: Relax the bring-your-own VNet subnet validation for converting non-HOBO to HOBO Automatic cluster.--apiserver-subnet-idis no longer required, and--system-node-subnet-idcan be supplied on its own; omitted subnets keep their current networking.--enable-hosted-systemis still required to request the conversion, and--node-subnet-idstill requires--system-node-subnet-id.General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)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.