1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml
Shuting Zhao 40c9824781 fix test
2019-10-30 12:58:14 -07:00

18 lines
No EOL
740 B
YAML

# file path relative to project root
input:
policy: samples/best_practices/deny_runasrootuser.yaml
resource: test/resources/resource_validate_nonRootUser.yaml
expected:
validation:
policyresponse:
policy: validate-deny-runasrootuser
resource:
kind: Pod
apiVersion: v1
namespace: ''
name: sec-ctx-unprivileged
rules:
- name: deny-runasrootuser
type: Validation
message: Validation rule 'deny-runasrootuser' failed to validate patterns defined in anyPattern. Root user is not allowed. Set runAsNonRoot to true.; anyPattern[0] failed at path /spec/securityContext/; anyPattern[1] failed at path /spec/containers/0/securityContext/
success: false