Skip to content

Commit 015b9df

Browse files
Merge pull request #234 from paulfantom/fix_service_monitor
Bug 1738527: install: add role bindings for prometheus service account
2 parents 59601a8 + b59561c commit 015b9df

4 files changed

+32
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: prometheus-k8s
5+
namespace: openshift-cluster-version
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- services
11+
- endpoints
12+
- pods
13+
verbs:
14+
- get
15+
- list
16+
- watch
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
name: prometheus-k8s
5+
namespace: openshift-cluster-version
6+
roleRef:
7+
apiGroup: rbac.authorization.k8s.io
8+
kind: Role
9+
name: prometheus-k8s
10+
subjects:
11+
- kind: ServiceAccount
12+
name: prometheus-k8s
13+
namespace: openshift-monitoring

pkg/payload/render.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ func Render(outputDir, releaseImage string) error {
3434
odir: oManifestsDir,
3535
skipFiles: sets.NewString(
3636
"image-references",
37-
"0000_90_cluster-version-operator_00_servicemonitor.yaml",
37+
"0000_90_cluster-version-operator_00_prometheusrole.yaml",
38+
"0000_90_cluster-version-operator_01_prometheusrolebinding.yaml",
39+
"0000_90_cluster-version-operator_02_servicemonitor.yaml",
3840
),
3941
}, {
4042
idir: bootstrapDir,

0 commit comments

Comments
 (0)