1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/test/scenarios/samples/best_practices/scenario_validate_nonRootUser.yaml

18 lines
756 B
YAML
Raw Normal View History

2019-08-30 00:22:37 -07:00
# file path relative to project root
input:
2019-10-14 12:36:19 -07:00
policy: samples/best_practices/policy_validate_deny_runasrootuser.yaml
2019-10-14 14:10:34 -07:00
resource: test/resources/resource_validate_nonRootUser.yaml
2019-08-30 00:22:37 -07:00
expected:
validation:
policyresponse:
policy: validate-deny-runasrootuser
2019-08-30 00:22:37 -07:00
resource:
kind: Pod
apiVersion: v1
namespace: ''
name: sec-ctx-unprivileged
rules:
- name: deny-runasrootuser
2019-08-30 00:22:37 -07:00
type: Validation
2019-09-17 18:51:16 -07:00
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