Skip to content

[AKS] Cluster health monitor addon#9674

Merged
yanzhudd merged 8 commits intoAzure:mainfrom
zman-ms:zman/cli-cluster-health-monitor-addon
Mar 13, 2026
Merged

[AKS] Cluster health monitor addon#9674
yanzhudd merged 8 commits intoAzure:mainfrom
zman-ms:zman/cli-cluster-health-monitor-addon

Conversation

@zman-ms
Copy link
Contributor

@zman-ms zman-ms commented Mar 11, 2026


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 March 11, 2026 19:08
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 11, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter enable_continuous_control_plane_and_addon_monitor
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter disable_continuous_control_plane_and_addon_monitor
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter enable_continuous_control_plane_and_addon_monitor

@azure-client-tools-bot-prd
Copy link

Hi @zman-ms,
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 setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 11, 2026

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

@github-actions
Copy link
Contributor

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
Contributor

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Copy link
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

Adds support in the AKS preview extension for enabling/disabling continuous control plane and addon monitoring via new CLI flags, wiring them through the managed cluster decorator flow and covering the behavior with unit tests.

Changes:

  • Introduces new --enable-continuous-control-plane-and-addon-monitor (create/update) and --disable-continuous-control-plane-and-addon-monitor (update) CLI arguments.
  • Implements create-time setup and update-time mutation of ManagedCluster.health_monitor_profile.enable_continuous_control_plane_and_addon_monitor.
  • Adds unit tests for the new context getters and decorator profile setup/update behavior.

Reviewed changes

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

File Description
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py Adds unit coverage for new context getters and for create/update decorator health monitor profile mutations (including mutual exclusivity on update).
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py Adds context accessors plus create/update decorator hooks to set/update the managed cluster health monitor profile based on the new flags.
src/aks-preview/azext_aks_preview/custom.py Plumbs new parameters into aks_create/aks_update so they appear in the raw parameter dict passed into decorators.
src/aks-preview/azext_aks_preview/_params.py Registers the new preview CLI arguments for aks create and aks update with help text.

You can also share your feedback on Copilot code review. Take the survey.

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

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

The change looks good to me. Would you like to add a scenario test in test_aks_commands.py to verify it end to end?

Copy link
Member

@FumingZhang FumingZhang left a 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. Once the test passed, please commit recording files (find them from pipeline artifacts) to pass CI checks.

  • test_aks_create_with_continuous_control_plane_and_addon_monitor
  • test_aks_update_with_continuous_control_plane_and_addon_monitor

@zman-ms
Copy link
Contributor Author

zman-ms commented Mar 12, 2026

queued a new live test pipeline for all test cases
https://dev.azure.com/msazure/CloudNativeCompute/_build/results?buildId=156440761&view=results

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd merged commit 9dd2085 into Azure:main Mar 13, 2026
24 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ aks-preview-19.0.0b25 ] : https://dev.azure.com/msazure/One/_build/results?buildId=156610721&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.

7 participants