1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/test/policy/validate/check_hostpath.yaml

25 lines
438 B
YAML
Raw Normal View History

---
apiVersion: kyverno.io/v1
2019-09-04 11:29:46 -07:00
kind: ClusterPolicy
2019-09-03 11:27:04 -07:00
metadata:
2019-10-14 12:36:19 -07:00
name: check-host-path
2019-09-03 11:27:04 -07:00
spec:
admission: true
background: true
2019-09-03 11:27:04 -07:00
rules:
- match:
any:
- resources:
kinds:
- Pod
name: check-host-path
2019-09-03 11:27:04 -07:00
validate:
message: Host path is not allowed
2019-09-03 11:27:04 -07:00
pattern:
spec:
volumes:
- hostPath:
2019-10-14 12:36:19 -07:00
path: ""
name: '*'
validationFailureAction: Audit