[AKS] az aks create: Simplify logic and enable correct recording rule groups for managed prom#31460
[AKS] az aks create: Simplify logic and enable correct recording rule groups for managed prom#31460zhoxing-ms merged 5 commits intoAzure:devfrom
az aks create: Simplify logic and enable correct recording rule groups for managed prom#31460Conversation
…ged prom (#2) * fix: simplify logic and enable correct recording rule groups for managed prom * Update create.py * Update delete.py
️✔️AzureCLI-FullTest
|
|
Hi @bragi92, |
️✔️AzureCLI-BreakingChangeTest
|
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Queued live test to validate the change, test passed!
|
az aks create: Simplify logic and enable correct recording rule groups for managed prom
|
Could you please add some tests for this PR? |
|
Could you please resolve these CI issues? |
|
Hey @bragi92, please resolve the failed CI checks promptly if you still plan to meet the upcoming code complete deadline on May 27th. |
|
@bragi92 please note that Azure CLI will have a code freeze on 05/27/2025 07:00 UTC for the upcoming release. Please address these comments ASAP, otherwise it has to be postponed to next sprint (07-01). |
|
Added unit tests! I'm good with the next milestone release. Please review this PR at your convinence @FumingZhang @zhoxing-ms |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Updated to include missed license header @FumingZhang ! Can you help in running /azp run again? |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az aks create -n kaveeshcli22 -g kaveeshcli --location westeurope --enable-azure-monitor-metrics --azure-monitor-workspace-resource-id "{full_id}" --grafana-resource-id "{full_id}" --enable-windows-recording-rulesaz aks create -n kaveeshcli22 -g kaveeshcli --disable-azure-monitor-metricsDescription
This PR updates the create_rules function to conditionally enable or disable Windows-specific Prometheus recording rule groups based on a new parameter, enable_windows_recording_rules. It ensures Windows rules are only applied when explicitly enabled, while general and Linux rules remain always enabled. Additionally, the rule group creation logic is streamlined and duplicated calls are handled per rule group index.
Testing Guide
Scenario 1:
az aks create -n kaveeshcli22 -g kaveeshcli --location westcentralus --enable-azure-monitor-metrics"and it should result in a success. Make sure the recording rules groups are created as expected for managed prometheus.Scenario 2:
History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.