UNCLASSIFIED - NO CUI

Skip to content

Update securityContext for test pod

Robert Massey requested to merge 53-run-as-non-root-kyverno-test into main

General MR

Summary

Adds securityContext at the pod level of the kyverno test pod in order to comply with require-non-root-user kyverno policy.

Relevant logs/screenshots

default                    25m         Warning   PolicyViolation                clusterpolicy/require-non-root-user                                          Pod kyverno/kyverno-kyverno-test: [non-root-user] fail; validation failure: validation error: Either `runAsNonRoot` must be set to true or `runAsUser` must be > 0 in spec.securityContext or (spec.containers[*].securityContext, spec.initContainers[*].securityContext, and spec.ephemeralContainers[*].securityContext). rule non-root-user[0] failed at path /securityContext/runAsNonRoot/ rule non-root-user[1] failed at path /securityContext/runAsUser/
kyverno                    25m         Warning   PolicyViolation                pod/kyverno-kyverno-test                                                     policy require-non-root-user/non-root-user fail: validation failure: validation error: Either `runAsNonRoot` must be set to true or `runAsUser` must be > 0 in spec.securityContext or (spec.containers[*].securityContext, spec.initContainers[*].securityContext, and spec.ephemeralContainers[*].securityContext). rule non-root-user[0] failed at path /securityContext/runAsNonRoot/ rule non-root-user[1] failed at path /securityContext/runAsUser/

Closes #53

Edited by Robert Massey

Merge request reports