apiVersion: kyverno.io/v1
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