Skip to content

Commit ee52bab

Browse files
authored
Give platform prometheus permission to scrape tekton-kueue (#7564)
Signed-off-by: Gal Ben Haim <[email protected]>
1 parent e51f0e9 commit ee52bab

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

components/kueue/development/tekton-kueue-monitoring/monitoring.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,32 @@ spec:
7676
selector:
7777
matchLabels:
7878
app.kubernetes.io/name: tekton-kueue-webhook
79+
---
80+
kind: Role
81+
apiVersion: rbac.authorization.k8s.io/v1
82+
metadata:
83+
name: tekton-kueue-metrics-read
84+
rules:
85+
- verbs:
86+
- get
87+
- list
88+
- watch
89+
apiGroups:
90+
- ''
91+
resources:
92+
- services
93+
- endpoints
94+
- pods
95+
---
96+
kind: RoleBinding
97+
apiVersion: rbac.authorization.k8s.io/v1
98+
metadata:
99+
name: tekton-kueue-prometheus-k8s-read-binding
100+
subjects:
101+
- kind: ServiceAccount
102+
name: prometheus-k8s
103+
namespace: openshift-monitoring
104+
roleRef:
105+
apiGroup: rbac.authorization.k8s.io
106+
kind: Role
107+
name: tekton-kueue-metrics-read

components/kueue/production/base/tekton-kueue-monitoring/monitoring.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,32 @@ spec:
7676
selector:
7777
matchLabels:
7878
app.kubernetes.io/name: tekton-kueue-webhook
79+
---
80+
kind: Role
81+
apiVersion: rbac.authorization.k8s.io/v1
82+
metadata:
83+
name: tekton-kueue-metrics-read
84+
rules:
85+
- verbs:
86+
- get
87+
- list
88+
- watch
89+
apiGroups:
90+
- ''
91+
resources:
92+
- services
93+
- endpoints
94+
- pods
95+
---
96+
kind: RoleBinding
97+
apiVersion: rbac.authorization.k8s.io/v1
98+
metadata:
99+
name: tekton-kueue-prometheus-k8s-read-binding
100+
subjects:
101+
- kind: ServiceAccount
102+
name: prometheus-k8s
103+
namespace: openshift-monitoring
104+
roleRef:
105+
apiGroup: rbac.authorization.k8s.io
106+
kind: Role
107+
name: tekton-kueue-metrics-read

components/kueue/staging/base/tekton-kueue-monitoring/monitoring.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,32 @@ spec:
7676
selector:
7777
matchLabels:
7878
app.kubernetes.io/name: tekton-kueue-webhook
79+
---
80+
kind: Role
81+
apiVersion: rbac.authorization.k8s.io/v1
82+
metadata:
83+
name: tekton-kueue-metrics-read
84+
rules:
85+
- verbs:
86+
- get
87+
- list
88+
- watch
89+
apiGroups:
90+
- ''
91+
resources:
92+
- services
93+
- endpoints
94+
- pods
95+
---
96+
kind: RoleBinding
97+
apiVersion: rbac.authorization.k8s.io/v1
98+
metadata:
99+
name: tekton-kueue-prometheus-k8s-read-binding
100+
subjects:
101+
- kind: ServiceAccount
102+
name: prometheus-k8s
103+
namespace: openshift-monitoring
104+
roleRef:
105+
apiGroup: rbac.authorization.k8s.io
106+
kind: Role
107+
name: tekton-kueue-metrics-read

0 commit comments

Comments
 (0)