Skip to content

Commit 26b2061

Browse files
s-urbaniaktimflannagan
authored andcommitted
manifests/*: comply to restricted pod security level
1 parent 29bb28f commit 26b2061

9 files changed

+90
-0
lines changed

manifests/0000_50_olm_06-psm-operator.deployment.ibm-cloud-managed.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,19 @@ spec:
2121
labels:
2222
app: package-server-manager
2323
spec:
24+
securityContext:
25+
runAsNonRoot: true
26+
runAsUser: 65534
27+
seccompProfile:
28+
type: RuntimeDefault
2429
serviceAccountName: olm-operator-serviceaccount
2530
priorityClassName: "system-cluster-critical"
2631
containers:
2732
- name: package-server-manager
33+
securityContext:
34+
allowPrivilegeEscalation: false
35+
capabilities:
36+
drop: ["ALL"]
2837
command:
2938
- /bin/psm
3039
- start

manifests/0000_50_olm_06-psm-operator.deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,19 @@ spec:
2121
labels:
2222
app: package-server-manager
2323
spec:
24+
securityContext:
25+
runAsNonRoot: true
26+
runAsUser: 65534
27+
seccompProfile:
28+
type: RuntimeDefault
2429
serviceAccountName: olm-operator-serviceaccount
2530
priorityClassName: "system-cluster-critical"
2631
containers:
2732
- name: package-server-manager
33+
securityContext:
34+
allowPrivilegeEscalation: false
35+
capabilities:
36+
drop: ["ALL"]
2837
command:
2938
- /bin/psm
3039
- start

manifests/0000_50_olm_07-collect-profiles.cronjob.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ spec:
1313
spec:
1414
template:
1515
spec:
16+
securityContext:
17+
runAsNonRoot: true
18+
runAsUser: 65534
19+
seccompProfile:
20+
type: RuntimeDefault
1621
serviceAccountName: collect-profiles
1722
priorityClassName: openshift-user-critical
1823
containers:
1924
- name: collect-profiles
25+
securityContext:
26+
allowPrivilegeEscalation: false
27+
capabilities:
28+
drop: ["ALL"]
2029
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
2130
imagePullPolicy: IfNotPresent
2231
command:

manifests/0000_50_olm_07-olm-operator.deployment.ibm-cloud-managed.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ spec:
8282
requests:
8383
cpu: 10m
8484
memory: 160Mi
85+
securityContext:
86+
allowPrivilegeEscalation: false
87+
capabilities:
88+
drop: ["ALL"]
8589
nodeSelector:
8690
kubernetes.io/os: linux
8791
tolerations:
@@ -97,3 +101,8 @@ spec:
97101
operator: Exists
98102
tolerationSeconds: 120
99103
priorityClassName: system-cluster-critical
104+
securityContext:
105+
runAsNonRoot: true
106+
runAsUser: 65534
107+
seccompProfile:
108+
type: RuntimeDefault

manifests/0000_50_olm_07-olm-operator.deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ spec:
8282
requests:
8383
cpu: 10m
8484
memory: 160Mi
85+
securityContext:
86+
allowPrivilegeEscalation: false
87+
capabilities:
88+
drop: ["ALL"]
8589
nodeSelector:
8690
kubernetes.io/os: linux
8791
node-role.kubernetes.io/master: ""
@@ -98,3 +102,8 @@ spec:
98102
operator: Exists
99103
tolerationSeconds: 120
100104
priorityClassName: system-cluster-critical
105+
securityContext:
106+
runAsNonRoot: true
107+
runAsUser: 65534
108+
seccompProfile:
109+
type: RuntimeDefault

manifests/0000_50_olm_08-catalog-operator.deployment.ibm-cloud-managed.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ spec:
7878
env:
7979
- name: RELEASE_VERSION
8080
value: "0.0.1-snapshot"
81+
securityContext:
82+
allowPrivilegeEscalation: false
83+
capabilities:
84+
drop: ["ALL"]
8185
nodeSelector:
8286
kubernetes.io/os: linux
8387
tolerations:
@@ -93,3 +97,8 @@ spec:
9397
operator: Exists
9498
tolerationSeconds: 120
9599
priorityClassName: system-cluster-critical
100+
securityContext:
101+
runAsNonRoot: true
102+
runAsUser: 65534
103+
seccompProfile:
104+
type: RuntimeDefault

manifests/0000_50_olm_08-catalog-operator.deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ spec:
7878
env:
7979
- name: RELEASE_VERSION
8080
value: "0.0.1-snapshot"
81+
securityContext:
82+
allowPrivilegeEscalation: false
83+
capabilities:
84+
drop: ["ALL"]
8185
nodeSelector:
8286
kubernetes.io/os: linux
8387
node-role.kubernetes.io/master: ""
@@ -94,3 +98,8 @@ spec:
9498
operator: Exists
9599
tolerationSeconds: 120
96100
priorityClassName: system-cluster-critical
101+
securityContext:
102+
runAsNonRoot: true
103+
runAsUser: 65534
104+
seccompProfile:
105+
type: RuntimeDefault

pkg/manifests/csv.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ spec:
136136
volumeMounts:
137137
- name: tmpfs
138138
mountPath: /tmp
139+
securityContext:
140+
allowPrivilegeEscalation: false
141+
capabilities:
142+
drop: ["ALL"]
139143
volumes:
140144
- name: tmpfs
141145
emptyDir: {}
@@ -150,6 +154,11 @@ spec:
150154
values:
151155
- packageserver
152156
topologyKey: "kubernetes.io/hostname"
157+
securityContext:
158+
runAsNonRoot: true
159+
runAsUser: 65534
160+
seccompProfile:
161+
type: RuntimeDefault
153162
maturity: alpha
154163
version: 0.19.0
155164
apiservicedefinitions:

scripts/generate_crds_manifests.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,19 @@ spec:
114114
labels:
115115
app: package-server-manager
116116
spec:
117+
securityContext:
118+
runAsNonRoot: true
119+
runAsUser: 65534
120+
seccompProfile:
121+
type: RuntimeDefault
117122
serviceAccountName: olm-operator-serviceaccount
118123
priorityClassName: "system-cluster-critical"
119124
containers:
120125
- name: package-server-manager
126+
securityContext:
127+
allowPrivilegeEscalation: false
128+
capabilities:
129+
drop: ["ALL"]
121130
command:
122131
- /bin/psm
123132
- start
@@ -262,10 +271,19 @@ spec:
262271
spec:
263272
template:
264273
spec:
274+
securityContext:
275+
runAsNonRoot: true
276+
runAsUser: 65534
277+
seccompProfile:
278+
type: RuntimeDefault
265279
serviceAccountName: collect-profiles
266280
priorityClassName: openshift-user-critical
267281
containers:
268282
- name: collect-profiles
283+
securityContext:
284+
allowPrivilegeEscalation: false
285+
capabilities:
286+
drop: ["ALL"]
269287
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
270288
imagePullPolicy: IfNotPresent
271289
command:

0 commit comments

Comments
 (0)