Skip to content

Commit 3d38d73

Browse files
committed
Fix ServiceMonitor RBAC for authenticated metrics endpoints
Add /metrics nonResourceURL permission to allow Prometheus to access authenticated metrics without HTTP 500 errors.
1 parent 53c4564 commit 3d38d73

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

manifests/0000_90_olm_00-service-monitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ rules:
1919
- get
2020
- list
2121
- watch
22+
- nonResourceURLs:
23+
- "/metrics"
24+
verbs:
25+
- get
2226
---
2327
apiVersion: rbac.authorization.k8s.io/v1
2428
kind: RoleBinding

microshift-manifests/0000_90_olm_00-service-monitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ rules:
1919
- get
2020
- list
2121
- watch
22+
- nonResourceURLs:
23+
- "/metrics"
24+
verbs:
25+
- get
2226
---
2327
apiVersion: rbac.authorization.k8s.io/v1
2428
kind: RoleBinding

staging/operator-lifecycle-manager/deploy/chart/templates/0000_90_olm_00-service-monitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,8 @@ rules:
8787
- get
8888
- list
8989
- watch
90+
- nonResourceURLs:
91+
- "/metrics"
92+
verbs:
93+
- get
9094
{{ end }}

0 commit comments

Comments
 (0)