This policy prevents the use of the default project in an Application.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: application-prevent-default-projectannotations:policies.kyverno.io/title: Prevent Use of Default Projectpolicies.kyverno.io/category: Argopolicies.kyverno.io/severity: mediumkyverno.io/kyverno-version: 1.6.2policies.kyverno.io/minversion: 1.6.0kyverno.io/kubernetes-version: "1.23"policies.kyverno.io/subject: Applicationpolicies.kyverno.io/description: This policy prevents the use of the default project in an Application.spec:validationFailureAction: Auditbackground: truerules:- name: default-projectmatch:any:- resources:kinds:- Applicationpreconditions:all:- key: "{{ request.operation || 'BACKGROUND' }}"operator: NotEqualsvalue: DELETEvalidate:message: The default project may not be used in an Application.pattern:spec:project: "!default"
This policy ensures that the name of the ApplicationSet is the same value provided in the project.
This policy ensures that the name of the ApplicationSet is the same value provided in the project.
This policy prevents the use of the default project in an Application.