e2e: add securityContext.runAsUser to vault-init-job

Kubelet sometimes reports the following error:

    failed to "StartContainer" for "vault-init-job" with CreateContainerConfigError: container has runAsNonRoot and image will run as root

Setting securityContext.runAsUser resolves this.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-07-08 16:47:47 +02:00 committed by mergify[bot]
parent e3c7dea7d6
commit 96bb8bfd0e

View File

@ -128,6 +128,8 @@ spec:
containers: containers:
- name: vault-init-job - name: vault-init-job
image: docker.io/library/vault:latest image: docker.io/library/vault:latest
securityContext:
runAsUser: 100
volumeMounts: volumeMounts:
- mountPath: /init-scripts - mountPath: /init-scripts
name: init-scripts-volume name: init-scripts-volume