Skip to content

Commit 5b8215d

Browse files
committed
feat: add securityContext in task manifests
The OCP4.19 requires security context to be part of the manifests Signed-off-by: Karel Simon <ksimon@redhat.com>
1 parent b10a4b3 commit 5b8215d

File tree

19 files changed

+131
-0
lines changed

19 files changed

+131
-0
lines changed

release/tasks/cleanup-vm/cleanup-vm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ spec:
8888
- mountPath: /data/connectionsecret/
8989
name: connectionsecret
9090
readOnly: true
91+
securityContext:
92+
allowPrivilegeEscalation: false
93+
capabilities:
94+
drop:
95+
- "ALL"
96+
seccompProfile:
97+
type: RuntimeDefault
9198
volumes:
9299
- name: connectionsecret
93100
secret:

release/tasks/create-vm-from-manifest/create-vm-from-manifest.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,10 @@ spec:
8181
valueFrom:
8282
fieldRef:
8383
fieldPath: metadata.name
84+
securityContext:
85+
allowPrivilegeEscalation: false
86+
capabilities:
87+
drop:
88+
- "ALL"
89+
seccompProfile:
90+
type: RuntimeDefault

release/tasks/disk-uploader/disk-uploader.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ spec:
8787
volumeMounts:
8888
- mountPath: /tmp
8989
name: disk
90+
securityContext:
91+
allowPrivilegeEscalation: false
92+
capabilities:
93+
drop:
94+
- "ALL"
95+
seccompProfile:
96+
type: RuntimeDefault
9097
volumes:
9198
- name: disk
9299
emptyDir: {}

release/tasks/disk-virt-customize/disk-virt-customize.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ spec:
6868
name: guestfsappliance
6969
- mountPath: /mnt/targetpvc/
7070
name: targetpvc
71+
securityContext:
72+
allowPrivilegeEscalation: false
73+
capabilities:
74+
drop:
75+
- "ALL"
76+
seccompProfile:
77+
type: RuntimeDefault
7178
volumes:
7279
- name: guestfsappliance
7380
emptyDir: {}

release/tasks/disk-virt-sysprep/disk-virt-sysprep.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ spec:
6868
name: guestfsappliance
6969
- mountPath: /mnt/targetpvc/
7070
name: targetpvc
71+
securityContext:
72+
allowPrivilegeEscalation: false
73+
capabilities:
74+
drop:
75+
- "ALL"
76+
seccompProfile:
77+
type: RuntimeDefault
7178
volumes:
7279
- name: guestfsappliance
7380
emptyDir: {}

release/tasks/execute-in-vm/execute-in-vm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ spec:
6969
- mountPath: /data/connectionsecret/
7070
name: connectionsecret
7171
readOnly: true
72+
securityContext:
73+
allowPrivilegeEscalation: false
74+
capabilities:
75+
drop:
76+
- "ALL"
77+
seccompProfile:
78+
type: RuntimeDefault
7279
volumes:
7380
- name: connectionsecret
7481
secret:

release/tasks/generate-ssh-keys/generate-ssh-keys.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,10 @@ spec:
7676
value: $(params.privateKeySecretNamespace)
7777
- name: ADDITIONAL_SSH_KEYGEN_OPTIONS
7878
value: $(params.additionalSSHKeygenOptions)
79+
securityContext:
80+
allowPrivilegeEscalation: false
81+
capabilities:
82+
drop:
83+
- "ALL"
84+
seccompProfile:
85+
type: RuntimeDefault

release/tasks/modify-data-object/modify-data-object.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,10 @@ spec:
9797
valueFrom:
9898
fieldRef:
9999
fieldPath: metadata.name
100+
securityContext:
101+
allowPrivilegeEscalation: false
102+
capabilities:
103+
drop:
104+
- "ALL"
105+
seccompProfile:
106+
type: RuntimeDefault

release/tasks/modify-windows-iso-file/modify-windows-iso-file.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ spec:
3939
capabilities:
4040
drop:
4141
- "ALL"
42+
seccompProfile:
43+
type: RuntimeDefault
4244
image: "quay.io/kubevirt/tekton-tasks-disk-virt:v0.24.0"
4345
script: |
4446
#!/bin/bash
@@ -87,6 +89,8 @@ spec:
8789
capabilities:
8890
drop:
8991
- "ALL"
92+
seccompProfile:
93+
type: RuntimeDefault
9094
image: "quay.io/kubevirt/tekton-tasks:v0.24.0"
9195
script: |
9296
#!/bin/bash
@@ -114,6 +118,8 @@ spec:
114118
capabilities:
115119
drop:
116120
- "ALL"
121+
seccompProfile:
122+
type: RuntimeDefault
117123
image: "quay.io/kubevirt/tekton-tasks-disk-virt:v0.24.0"
118124
script: |
119125
#!/bin/bash

release/tasks/wait-for-vmi-status/wait-for-vmi-status.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ spec:
5353
value: $(params.successCondition)
5454
- name: FAILURE_CONDITION
5555
value: $(params.failureCondition)
56+
securityContext:
57+
allowPrivilegeEscalation: false
58+
capabilities:
59+
drop:
60+
- "ALL"
61+
seccompProfile:
62+
type: RuntimeDefault

0 commit comments

Comments
 (0)