The restricted profile of the Pod Security Standards, which is inclusive of the baseline profile, is a collection of all the most common configurations that can be taken to secure Pods. Beginning with Kyverno 1.8, an entire profile may be assigned to the cluster through a single rule. In some cases, specific exemptions must be made on a per-control basis. This policy configures the restricted profile through the latest version of the Pod Security Standards cluster wide while exempting `nginx` and `redis` container images from the Capabilities control check.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: podsecurity-subrule-restricted-capabilitiesannotations:policies.kyverno.io/title: Restricted Pod Security Standards with Container-Level Control Exemptionpolicies.kyverno.io/category: Pod Securitypolicies.kyverno.io/severity: mediumkyverno.io/kyverno-version: 1.8.0policies.kyverno.io/minversion: 1.8.0kyverno.io/kubernetes-version: "1.24"policies.kyverno.io/subject: Podpolicies.kyverno.io/description: The restricted profile of the Pod Security Standards, which is inclusive of the baseline profile, is a collection of all the most common configurations that can be taken to secure Pods. Beginning with Kyverno 1.8, an entire profile may be assigned to the cluster through a single rule. In some cases, specific exemptions must be made on a per-control basis. This policy configures the restricted profile through the latest version of the Pod Security Standards cluster wide while exempting `nginx` and `redis` container images from the Capabilities control check.spec:background: truevalidationFailureAction: Enforcerules:- name: restricted-exempt-capabilitiesmatch:any:- resources:kinds:- Podvalidate:podSecurity:level: restrictedversion: latestexclude:- controlName: Capabilitiesimages:- ghcr.io/kyverno/test-nginx*- redis*
This policy prevents the use of the default project in an Application.
Services of type LoadBalancer when deployed inside AWS have support for transport encryption if it is enabled via an annotation. This policy requires that Services of type LoadBalancer contain the annotation service.beta.kubernetes.io/aws-load-balancer-ssl-cert with some value.
This policy prevents updates to the project field after an Application is created.