mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
23 lines
No EOL
608 B
YAML
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 |