1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/samples/best_practices/require_readonly_rootfilesystem.yaml
2019-10-11 18:57:16 -07:00

21 lines
No EOL
569 B
YAML

apiVersion: kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: validate-readonly-rootfilesystem
annotations:
policies.kyverno.io/category: Security Context
policies.kyverno.io/description: Containers should run with read-only rootfilesystem
spec:
rules:
- name: validate-readonly-rootfilesystem
match:
resources:
kinds:
- Pod
validate:
message: "Container require read-only rootfilesystem"
pattern:
spec:
containers:
- securityContext:
readOnlyRootFilesystem: true