1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
kyverno/test/validate/check_not_root.yaml
2019-10-09 21:06:49 -07:00

21 lines
456 B
YAML

apiVersion : kyverno.io/v1alpha1
kind : ClusterPolicy
metadata :
name : check-non-root
spec :
rules:
- name: check-non-root
match:
resources:
kinds:
- Deployment
- StatefuleSet
- DaemonSet
validate:
message: "Root user is not allowed"
pattern:
spec:
template:
spec:
securityContext:
runAsNonRoot: true