This policy ensures that the name of the ApplicationSet is the same value provided in the project.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: applicationset-name-matches-projectannotations:policies.kyverno.io/title: Ensure ApplicationSet Name Matches 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: ApplicationSetpolicies.kyverno.io/description: This policy ensures that the name of the ApplicationSet is the same value provided in the project.spec:validationFailureAction: Auditbackground: truerules:- name: match-namematch:any:- resources:kinds:- ApplicationSetpreconditions:all:- key: "{{ request.operation || 'BACKGROUND' }}"operator: NotEqualsvalue: DELETEvalidate:message: The name must match the project.pattern:spec:template:spec:project: "{{request.object.metadata.name}}"
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.