Skip to content

Commit

Permalink
vSphere: Fix security context of VDDK validation pod
Browse files Browse the repository at this point in the history
The security context was set with RunAsNonRoot = true while the user
wasn't specified, which lead to an error when migrating to the default
namespace: container has runAsNonRoot and image will run as root. This
issue is fixed by setting the user to the QEMU user (107).

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Mar 3, 2024
1 parent 206eb3c commit 3dae4f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/plan/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ func createVddkCheckJob(plan *api.Plan, labels map[string]string, el9 bool, vddk
Spec: core.PodSpec{
SecurityContext: &core.PodSecurityContext{
RunAsNonRoot: ptr.To(true),
RunAsUser: ptr.To(qemuUser),
SeccompProfile: &core.SeccompProfile{
Type: core.SeccompProfileTypeRuntimeDefault,
},
Expand Down

0 comments on commit 3dae4f6

Please sign in to comment.