Skip to content

Commit b252943

Browse files
committed
Use user namespaces for all deployments
This goes for both the operator and the operand.
1 parent dfaeb8d commit b252943

File tree

5 files changed

+29
-2
lines changed

5 files changed

+29
-2
lines changed

bindata/assets/openshift-controller-manager/deploy.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ spec:
3333
name: openshift-controller-manager
3434
annotations:
3535
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
36-
openshift.io/required-scc: restricted-v2
36+
openshift.io/required-scc: nonroot-v2
3737
labels:
3838
app: openshift-controller-manager-a
3939
controller-manager: "true"
4040
spec:
41+
hostUsers: false
4142
securityContext:
4243
runAsNonRoot: true
44+
runAsUser: 1000
45+
runAsGroup: 1000
46+
fsGroup: 1000
4347
seccompProfile:
4448
type: RuntimeDefault
4549
priorityClassName: system-node-critical

bindata/assets/openshift-controller-manager/informer-clusterrole.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ rules:
2121
- create
2222
- patch
2323
- update
24+
# Allow for nonroot-v2 SCC
25+
- apiGroups:
26+
- security.openshift.io
27+
resources:
28+
- securitycontextconstraints
29+
resourceNames:
30+
- nonroot-v2
31+
verbs:
32+
- use

bindata/assets/openshift-controller-manager/route-controller-manager-clusterrole.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,12 @@ rules:
4949
- get
5050
- list
5151
- watch
52+
# Allow for nonroot-v2 SCC
53+
- apiGroups:
54+
- security.openshift.io
55+
resources:
56+
- securitycontextconstraints
57+
resourceNames:
58+
- nonroot-v2
59+
verbs:
60+
- use

bindata/assets/openshift-controller-manager/route-controller-manager-deploy.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ spec:
2323
name: route-controller-manager
2424
annotations:
2525
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
26-
openshift.io/required-scc: restricted-v2
26+
openshift.io/required-scc: nonroot-v2
2727
labels:
2828
app: route-controller-manager
2929
route-controller-manager: "true"
3030
spec:
31+
hostUsers: false
3132
securityContext:
3233
runAsNonRoot: true
34+
runAsUser: 1000
35+
runAsGroup: 1000
36+
fsGroup: 1000
3337
seccompProfile:
3438
type: RuntimeDefault
3539
priorityClassName: system-node-critical

manifests/09_deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
labels:
2424
app: openshift-controller-manager-operator
2525
spec:
26+
hostUsers: false
2627
securityContext:
2728
runAsNonRoot: true
2829
runAsUser: 65534

0 commit comments

Comments
 (0)