1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-08 17:06:57 +00:00
kyverno/samples/best_practices/require_readonly_rootfilesystem.yaml

21 lines
569 B
YAML
Raw Normal View History

apiVersion: kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: validate-readonly-rootfilesystem
2019-10-11 18:57:16 -07:00
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