Rebrand az aks bastion command to support managed bastion - #10200
Rebrand az aks bastion command to support managed bastion#10200Wei Chen (weichch) wants to merge 8 commits into
Conversation
|
Hi Wei Chen (@weichch), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR rebrands the existing az aks bastion command into a dedicated command group to support managed Azure Bastion lifecycle operations (enable/disable/update) while keeping connectivity via a new az aks bastion tunnel subcommand.
Changes:
- Replaces the old
az aks bastioncommand with anaks bastiongroup and introducesenable,disable,update, andtunnelsubcommands. - Adds managed bastion profile update logic plus parameter wiring, validation, and help updates.
- Updates/extends unit and scenario tests, and bumps
aks-previewextension version + changelog for the breaking change.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/setup.py | Bumps extension version to 22.0.0b1. |
| src/aks-preview/HISTORY.rst | Documents the breaking change and new bastion subcommands. |
| src/aks-preview/azext_aks_preview/commands.py | Replaces the prior aks bastion command with a new command group and subcommands. |
| src/aks-preview/azext_aks_preview/custom.py | Adds aks_bastion_enable/disable/update and renames connectivity command to aks_bastion_tunnel with managed-bastion default selection. |
| src/aks-preview/azext_aks_preview/managedbastion.py | New helper implementing managed bastion profile updates via the managed cluster API. |
| src/aks-preview/azext_aks_preview/_params.py | Adds CLI arguments for managed bastion commands and re-scopes tunnel arguments. |
| src/aks-preview/azext_aks_preview/_validators.py | Adds validation for --bastion-public-ip resource ID input. |
| src/aks-preview/azext_aks_preview/_help.py | Adds/updates help entries for the new aks bastion group and subcommands. |
| src/aks-preview/azext_aks_preview/_consts.py | Adds bastion SKU constants. |
| src/aks-preview/azext_aks_preview/tests/latest/test_validators.py | Adds unit tests for the new bastion public IP validator. |
| src/aks-preview/azext_aks_preview/tests/latest/test_managedbastion.py | New unit tests for managed bastion profile update behavior. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_bastion.py | Adds unit tests ensuring tunnel prefers managed bastion when enabled. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Updates scenario test for tunnel + adds enable/update/disable scenarios (including BYO public IP). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
AKS |
🤖 PR Validation — ❌ Action needed
❌Azure CLI Extensions Breaking Change Test
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks bastionaz aks bastion enableaz aks bastion disableaz aks bastion tunnelGeneral 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.