Skip to content

Commit 1700b12

Browse files
authored
don't use cluster scope permissions when metrics auth is disabled (#1804)
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent ea8b4c3 commit 1700b12

File tree

1 file changed

+2
-2
lines changed
  • config/charts/inferencepool/templates

1 file changed

+2
-2
lines changed

config/charts/inferencepool/templates/rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.inferenceExtension.monitoring.prometheus.enabled }}
12
kind: ClusterRole
23
apiVersion: rbac.authorization.k8s.io/v1
34
metadata:
@@ -17,12 +18,10 @@ rules:
1718
- subjectaccessreviews
1819
verbs:
1920
- create
20-
{{- if .Values.inferenceExtension.monitoring.prometheus.enabled }}
2121
- nonResourceURLs:
2222
- "/metrics"
2323
verbs:
2424
- get
25-
{{- end }}
2625
---
2726
kind: ClusterRoleBinding
2827
apiVersion: rbac.authorization.k8s.io/v1
@@ -36,6 +35,7 @@ roleRef:
3635
apiGroup: rbac.authorization.k8s.io
3736
kind: ClusterRole
3837
name: {{ include "gateway-api-inference-extension.cluster-rbac-name" . }}
38+
{{- end }}
3939
---
4040
apiVersion: rbac.authorization.k8s.io/v1
4141
kind: Role

0 commit comments

Comments
 (0)