Skip to content

Commit 47fac27

Browse files
authored
fix: add cluster scope to recording rules in policy (#1064)
[comment]: # (Note that your PR title should follow the conventional commit format: https://conventionalcommits.org/en/v1.0.0/#summary) # PR Description [comment]: # (The below checklist is for PRs adding new features. If a box is not checked, add a reason why it's not needed.) # New Feature Checklist - [ ] List telemetry added about the feature. - [ ] Link to the one-pager about the feature. - [ ] List any tasks necessary for release (3P docs, AKS RP chart changes, etc.) after merging the PR. - [ ] Attach results of scale and perf testing. [comment]: # (The below checklist is for code changes. Not all boxes necessarily need to be checked. Build, doc, and template changes do not need to fill out the checklist.) # Tests Checklist - [ ] Have end-to-end Ginkgo tests been run on your cluster and passed? To bootstrap your cluster to run the tests, follow [these instructions](/otelcollector/test/README.md#bootstrap-a-dev-cluster-to-run-ginkgo-tests). - Labels used when running the tests on your cluster: - [ ] `operator` - [ ] `windows` - [ ] `arm64` - [ ] `arc-extension` - [ ] `fips` - [ ] Have new tests been added? For features, have tests been added for this feature? For fixes, is there a test that could have caught this issue and could validate that the fix works? - [ ] Is a new scrape job needed? - [ ] The scrape job was added to the folder [test-cluster-yamls](/otelcollector/test/test-cluster-yamls/) in the correct configmap or as a CR. - [ ] Was a new test label added? - [ ] A string constant for the label was added to [constants.go](/otelcollector/test/utils/constants.go). - [ ] The label and description was added to the [test README](/otelcollector/test/README.md). - [ ] The label was added to this [PR checklist](/.github/pull_request_template). - [ ] The label was added as needed to [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml). - [ ] Are additional API server permissions needed for the new tests? - [ ] These permissions have been added to [api-server-permissions.yaml](/otelcollector/test/testkube/api-server-permissions.yaml). - [ ] Was a new test suite (a new folder under `/tests`) added? - [ ] The new test suite is included in [testkube-test-crs.yaml](/otelcollector/test/testkube/testkube-test-crs.yaml).
1 parent 2ebabaf commit 47fac27

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

AddonPolicyTemplate/AddonPolicyMetricsProfile.rules.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@
201201
"properties": {
202202
"description": "[concat(variables('nodeRecordingRuleGroupDescription'), variables('version'))]",
203203
"scopes": [
204-
"[parameters('azureMonitorWorkspaceResourceId')]"
204+
"[parameters('azureMonitorWorkspaceResourceId')]",
205+
"[parameters('clusterResourceId')]"
205206
],
206207
"clusterName": "[variables('clusterName')]",
207208
"interval": "PT1M",
@@ -261,7 +262,8 @@
261262
"properties": {
262263
"description": "[concat(variables('kubernetesRecordingRuleGroupDescription'), variables('version'))]",
263264
"scopes": [
264-
"[parameters('azureMonitorWorkspaceResourceId')]"
265+
"[parameters('azureMonitorWorkspaceResourceId')]",
266+
"[parameters('clusterResourceId')]"
265267
],
266268
"clusterName": "[variables('clusterName')]",
267269
"interval": "PT1M",
@@ -365,7 +367,8 @@
365367
"properties": {
366368
"description": "[concat(variables('RecordingRuleGroupDescriptionWin'), variables('version'))]",
367369
"scopes": [
368-
"[parameters('azureMonitorWorkspaceResourceId')]"
370+
"[parameters('azureMonitorWorkspaceResourceId')]",
371+
"[parameters('clusterResourceId')]"
369372
],
370373
"enabled": "[parameters('enableWindowsRecordingRules')]",
371374
"clusterName": "[variables('clusterName')]",
@@ -442,7 +445,8 @@
442445
"properties": {
443446
"description": "[concat(variables('RecordingRuleGroupDescriptionWin'), variables('version'))]",
444447
"scopes": [
445-
"[parameters('azureMonitorWorkspaceResourceId')]"
448+
"[parameters('azureMonitorWorkspaceResourceId')]",
449+
"[parameters('clusterResourceId')]"
446450
],
447451
"enabled": "[parameters('enableWindowsRecordingRules')]",
448452
"clusterName": "[variables('clusterName')]",

RELEASENOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* AKS and Arc Container Images:
88
- Add scrape_samples_scraped metric to telemetry when debug mode is enabled (https://github.com/Azure/prometheus-collector/pull/1055)
99
- fix: set proxy the old way for mdsd in golang (https://github.com/Azure/prometheus-collector/pull/1062)
10+
- fix: add cluster scope to recording rules in policy (https://github.com/Azure/prometheus-collector/pull/1064)
1011
* Arc Extension Chart:
1112

1213
* Pipeline/Docs/Templates Updates:

0 commit comments

Comments
 (0)