Skip to content

[AKS] az aks update: Set CMK property "enabled" to false and reserve other CMK properties for a PMK-enabled and CMK-disabled cluster#9398

Merged
yanzhudd merged 1 commit intoAzure:mainfrom
bingosummer:binxi/aks-k2p-disable-cmk
Nov 7, 2025
Merged

[AKS] az aks update: Set CMK property "enabled" to false and reserve other CMK properties for a PMK-enabled and CMK-disabled cluster#9398
yanzhudd merged 1 commit intoAzure:mainfrom
bingosummer:binxi/aks-k2p-disable-cmk

Conversation

@bingosummer
Copy link
Copy Markdown
Member


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

Related command

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 wheel==0.30.0 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.

Copilot AI review requested due to automatic review settings November 6, 2025 08:21
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Nov 6, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Nov 6, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2025

Copy link
Copy Markdown
Member

@AbelHu AbelHu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 updates the behavior when disabling Customer-Managed Keys (CMK) on Azure Kubernetes Service clusters to preserve CMK configuration properties rather than clearing them.

  • Modified the KMS update logic to preserve existing CMK properties (key_id, key_vault_resource_id, key_vault_network_access) when setting enabled=False
  • Updated tests to reflect the new behavior of retaining CMK configuration on disable
  • Bumped version to 19.0.0b12

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/aks-preview/setup.py Version bump from 19.0.0b11 to 19.0.0b12
src/aks-preview/HISTORY.rst Added release notes for version 19.0.0b12 describing the CMK property preservation behavior
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py Removed initialization of empty AzureKeyVaultKms object to preserve existing CMK properties when disabling
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py Updated test expectations to verify CMK properties are preserved when disabled, added key_vault_network_access values to test data

Comment thread src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Comment thread src/aks-preview/HISTORY.rst Outdated
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

FumingZhang
FumingZhang previously approved these changes Nov 7, 2025
…e other CMK properties for a PMK-enabled and CMK-disabled cluster
@yanzhudd
Copy link
Copy Markdown
Contributor

yanzhudd commented Nov 7, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd merged commit fde1dbf into Azure:main Nov 7, 2025
25 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

azclibot commented Nov 7, 2025

[Release] Update index.json for extension [ aks-preview-19.0.0b13 ] : https://dev.azure.com/msazure/One/_build/results?buildId=142984065&view=results

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

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants