1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/scenarios/validate/policy_validate_selinux_context.yaml
shivkumar dudhani 530ac6962c initial clean up
2019-10-14 12:36:19 -07:00

23 lines
No EOL
608 B
YAML

apiVersion: kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: validate-selinux-options
spec:
validationFailureAction: "audit"
rules:
- name: validate-selinux-options
match:
resources:
kinds:
- Pod
validate:
message: "SELinux level is required"
pattern:
spec:
containers:
- securityContext:
seLinuxOptions:
level: "*"
# level: "s0:c25,c968"
# If SELinux security module is loaded on the host operating system,
# we can make sure pods only have access to specified configured level