1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/examples/validate/check_hostpath.yaml

20 lines
349 B
YAML
Raw Normal View History

apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
name: check-host-path
spec:
rules:
- name: check-host-path
2019-07-25 14:57:44 -04:00
match:
resources:
kinds:
- Pod
validate:
2019-05-23 20:42:34 -07:00
message: "Host path is not allowed"
pattern:
2019-05-23 20:37:11 +03:00
spec:
volumes:
2019-05-23 20:42:34 -07:00
- name: "*"
2019-05-23 20:37:11 +03:00
hostPath:
2019-05-23 20:42:34 -07:00
path: ""