Legacy k8s.gcr.io container image registry will be frozen in early April 2023 k8s.gcr.io image registry will be frozen from the 3rd of April 2023. Images for Kubernetes 1.27 will not be available in the k8s.gcr.io image registry. Please read our announcement for more details. https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/
apiVersion: policies.kyverno.io/v1alpha1kind: ValidatingPolicymetadata:name: restrict-deprecated-registryannotations:policies.kyverno.io/title: Restrict Deprecated Registry in ValidatingPolicypolicies.kyverno.io/category: Best Practices, EKS Best Practices in vpolpolicies.kyverno.io/severity: highpolicies.kyverno.io/minversion: 1.14.0kyverno.io/kubernetes-version: 1.27-1.28policies.kyverno.io/subject: Podpolicies.kyverno.io/description: "Legacy k8s.gcr.io container image registry will be frozen in early April 2023 k8s.gcr.io image registry will be frozen from the 3rd of April 2023. Images for Kubernetes 1.27 will not be available in the k8s.gcr.io image registry. Please read our announcement for more details. https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/ "spec:validationActions:- Denyevaluation:background:enabled: truematchConstraints:resourceRules:- apiGroups:- ""apiVersions:- v1operations:- CREATE- UPDATEresources:- podsvariables:- name: allContainersexpression: object.spec.containers + object.spec.?initContainers.orValue([]) + object.spec.?ephemeralContainers.orValue([])validations:- expression: variables.allContainers.all(container, !container.image.startsWith('k8s.gcr.io/'))message: The "k8s.gcr.io" image registry is deprecated. "registry.k8s.io" should now be used.
This policy prevents the use of the default project in an Application.
This policy prevents updates to the project field after an Application is created.
This policy ensures that the name of the ApplicationSet is the same value provided in the project.