mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
20 lines
No EOL
498 B
YAML
20 lines
No EOL
498 B
YAML
apiVersion: "kyverno.io/v1alpha1"
|
|
kind: "ClusterPolicy"
|
|
metadata:
|
|
name: "deny-use-of-host-fs"
|
|
annotations:
|
|
policies.kyverno.io/category: Data Protection
|
|
policies.kyverno.io/description: The volume should not mount to the host filesystem
|
|
spec:
|
|
rules:
|
|
- name: "deny-use-of-host-fs"
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- "Pod"
|
|
validate:
|
|
message: "Host path is not allowed"
|
|
pattern:
|
|
spec:
|
|
volumes:
|
|
- X(hostPath): null |