Skip to content

Commit 5f78993

Browse files
committed
UPSTREAM: <carry>: SSC RBAC
After reducing the RBAC granted to the OLM ServiceAccount in an earlier commit, this commit introduces RBAC so pods that use the OLM ServiceAccount will qualify to use the restricted-v2 SCC. Signed-off-by: Alexander Greene <[email protected]>
1 parent 8f834fe commit 5f78993

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

manifests/0000_50_olm_01-olm-operator.serviceaccount.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ metadata:
1919
rules:
2020
- apiGroups: ["*"]
2121
resources: ["*"]
22-
verbs: ["*"]
22+
verbs: ["watch", "list", "get", "create", "update", "patch", "delete", "deletecollection", "escalate", "bind"]
2323
- nonResourceURLs: ["*"]
2424
verbs: ["*"]
25+
- apiGroups:
26+
- security.openshift.io
27+
resources:
28+
- securitycontextconstraints
29+
resourceNames:
30+
- restricted-v2
31+
verbs:
32+
- use
2533
---
2634
apiVersion: rbac.authorization.k8s.io/v1
2735
kind: ClusterRoleBinding

scripts/generate_crds_manifests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ add_ibm_managed_cloud_annotations() {
8787
}
8888

8989
${YQ} merge --inplace -d'*' manifests/0000_50_olm_00-namespace.yaml scripts/namespaces.patch.yaml
90+
${YQ} merge --inplace --arrays=append -d'1' manifests/0000_50_olm_01-olm-operator.serviceaccount.yaml scripts/olm-service.patch.yaml
9091
${YQ} merge --inplace -d'0' manifests/0000_50_olm_00-namespace.yaml scripts/monitoring-namespace.patch.yaml
9192
${YQ} write --inplace -s scripts/olm-deployment.patch.yaml manifests/0000_50_olm_07-olm-operator.deployment.yaml
9293
${YQ} write --inplace -s scripts/catalog-deployment.patch.yaml manifests/0000_50_olm_08-catalog-operator.deployment.yaml

scripts/olm-service.patch.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
rules:
2+
- apiGroups:
3+
- security.openshift.io
4+
resources:
5+
- securitycontextconstraints
6+
resourceNames:
7+
- restricted-v2
8+
verbs:
9+
- use

0 commit comments

Comments
 (0)