Skip to content

Commit ce3ecdd

Browse files
authored
fix(helm): use the same scc as olm (#488)
* fix(helm): use the same scc as olm * fix indentation
1 parent 7c4ef68 commit ce3ecdd

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

deploy/helm/secret-operator/templates/roles.yaml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
2+
---
3+
apiVersion: security.openshift.io/v1
4+
kind: SecurityContextConstraints
5+
metadata:
6+
name: stackable-secret-operator-scc
7+
annotations:
8+
kubernetes.io/description: SCC for Stackable secret operator
9+
allowHostDirVolumePlugin: true
10+
allowHostIPC: false
11+
allowHostNetwork: false
12+
allowHostPID: false
13+
allowHostPorts: false
14+
allowPrivilegeEscalation: true
15+
allowPrivilegedContainer: true # Needed because otherwise we get spec.template.spec.containers[0].volumeMounts.mountPropagation: Forbidden: Bidirectional mount propagation is available only to privileged containers
16+
allowedCapabilities: null
17+
defaultAddCapabilities: null
18+
fsGroup:
19+
type: RunAsAny
20+
groups: []
21+
priority: null
22+
readOnlyRootFilesystem: false
23+
requiredDropCapabilities:
24+
- MKNOD
25+
runAsUser:
26+
type: RunAsAny
27+
seLinuxContext:
28+
type: MustRunAs
29+
supplementalGroups:
30+
type: RunAsAny
31+
users: []
32+
volumes:
33+
- downwardAPI
34+
- projected
35+
- hostPath
36+
- emptyDir
37+
{{ end }}
138
---
239
apiVersion: rbac.authorization.k8s.io/v1
340
kind: ClusterRole
@@ -67,11 +104,13 @@ rules:
67104
- podlisteners
68105
verbs:
69106
- get
107+
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
70108
- apiGroups:
71-
- security.openshift.io
109+
- security.openshift.io
72110
resourceNames:
73-
- privileged
111+
- stackable-secret-operator-scc
74112
resources:
75-
- securitycontextconstraints
113+
- securitycontextconstraints
76114
verbs:
77-
- use
115+
- use
116+
{{ end }}

0 commit comments

Comments
 (0)