Skip to content

Commit b5b49fe

Browse files
committed
scripts: Add downstream-only patches for custom Pod securityContext configurations
Signed-off-by: timflannagan <[email protected]>
1 parent 26b2061 commit b5b49fe

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

scripts/catalog-deployment.patch.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@
99
value:
1010
name: RELEASE_VERSION
1111
value: "0.0.1-snapshot"
12+
- command: update
13+
path: spec.template.spec.containers[*].securityContext
14+
value:
15+
allowPrivilegeEscalation: false
16+
capabilities:
17+
drop: ["ALL"]
18+
- command: update
19+
path: spec.template.spec.securityContext
20+
value:
21+
runAsNonRoot: true
22+
runAsUser: 65534
23+
seccompProfile:
24+
type: RuntimeDefault

scripts/olm-deployment.patch.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@
99
value:
1010
name: RELEASE_VERSION
1111
value: "0.0.1-snapshot"
12+
- command: update
13+
path: spec.template.spec.containers[*].securityContext
14+
value:
15+
allowPrivilegeEscalation: false
16+
capabilities:
17+
drop: ["ALL"]
18+
- command: update
19+
path: spec.template.spec.securityContext
20+
value:
21+
runAsNonRoot: true
22+
runAsUser: 65534
23+
seccompProfile:
24+
type: RuntimeDefault

scripts/packageserver-deployment.patch.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,16 @@
3333
values:
3434
- packageserver
3535
topologyKey: "kubernetes.io/hostname"
36+
- command: update
37+
path: spec.install.spec.deployments[0].spec.template.spec.containers[*].securityContext
38+
value:
39+
allowPrivilegeEscalation: false
40+
capabilities:
41+
drop: ["ALL"]
42+
- command: update
43+
path: spec.install.spec.deployments[0].spec.template.spec.securityContext
44+
value:
45+
runAsNonRoot: true
46+
runAsUser: 65534
47+
seccompProfile:
48+
type: RuntimeDefault

0 commit comments

Comments
 (0)