Skip to content

Commit b671dc5

Browse files
committed
Fix dashboard-resources Role typo excluding the alertmanager WorkloadMonitor
The dashboard-resources Role whitelisted '- alermanager' (misspelled) in its workloadmonitors resourceNames, so the real 'alertmanager' WorkloadMonitor was never RBAC-covered — a tenant's dashboard gets forbidden reading its status and the alertmanager health tile breaks. This PR edits that exact resourceNames list (it adds the otel-traces entry a few lines below), so the defect is in the block it owns. Correct the name and add assertions that the Role covers alertmanager by its real name and not the typo; mutation-verified (restoring the typo reds it). Signed-off-by: Alexey Artamonov <[email protected]>
1 parent b000ef7 commit b671dc5

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎packages/extra/monitoring/templates/dashboard-resourcemap.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ rules:
3535
- grafana
3636
- grafana-db
3737
- alerta-db
38-
- alermanager
38+
- alertmanager
3939
{{- range .Values.metricsStorages }}
4040
- {{ .name }}-vmstorage
4141
- {{ .name }}-vmselect

‎packages/extra/monitoring/tests/workloadmonitors_traces_test.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ tests:
6868
- contains:
6969
path: rules[3].resourceNames
7070
content: otel-traces
71+
# The Role must whitelist each WorkloadMonitor by its real name. Guard the
72+
# alertmanager entry, which shipped misspelled ("alermanager") so the
73+
# alertmanager WorkloadMonitor was silently not RBAC-covered for the
74+
# dashboard — a defect in the exact resourceNames list this PR edits.
75+
- contains:
76+
path: rules[3].resourceNames
77+
content: alertmanager
78+
- notContains:
79+
path: rules[3].resourceNames
80+
content: alermanager
7181

7282
# Absence is asserted on the resourcemap Role (a single deterministic document)
7383
# via notContains rather than on workloadmonitors.yaml: that template emits a

0 commit comments

Comments
 (0)