Skip to content

Rebrand az aks bastion command to support managed bastion - #10200

Open
Wei Chen (weichch) wants to merge 8 commits into
Azure:mainfrom
weichch:aksbastion
Open

Rebrand az aks bastion command to support managed bastion#10200
Wei Chen (weichch) wants to merge 8 commits into
Azure:mainfrom
weichch:aksbastion

Conversation

@weichch

@weichch Wei Chen (weichch) commented Aug 11, 2026

Copy link
Copy Markdown

🤖 PR Validation — ❌ Action needed

Breaking Changes
❌ 1
❌Azure CLI Extensions Breaking Change Test
❌aks-preview
rule cmd_name rule_message suggest_message
1002 - CmdRemove aks bastion cmd aks bastion removed please confirm cmd aks bastion removed
⚠️ 1011 - SubgroupAdd aks bastion sub group aks bastion added

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

  • az aks bastion
  • az aks bastion enable
  • az aks bastion disable
  • az aks bastion tunnel

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Wei Chen (@weichch),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@weichch
Wei Chen (weichch) marked this pull request as ready for review August 11, 2026 06:06
Copilot AI lite review requested due to automatic review settings August 11, 2026 06:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 bastion command with an aks bastion group and introduces enable, disable, update, and tunnel subcommands.
  • Adds managed bastion profile update logic plus parameter wiring, validation, and help updates.
  • Updates/extends unit and scenario tests, and bumps aks-preview extension 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.

Comment thread src/aks-preview/azext_aks_preview/managedbastion.py Outdated
Comment thread src/aks-preview/azext_aks_preview/_params.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

AKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants