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/policy_validate_selinux_context.yaml

23 lines
608 B
YAML
Raw Normal View History

2019-10-04 17:28:42 -07:00
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"
2019-10-04 17:28:42 -07:00
pattern:
spec:
containers:
- securityContext:
seLinuxOptions:
2019-10-09 21:06:49 -07:00
level: "*"
# level: "s0:c25,c968"
2019-10-09 18:39:57 -07:00
# If SELinux security module is loaded on the host operating system,
# we can make sure pods only have access to specified configured level