Define and use labels that identify semantic attributes of your application or Deployment. A common set of labels allows tools to work collaboratively, describing objects in a common manner that all tools can understand. The recommended labels describe applications in a way that can be queried. This policy validates that the label `app.kubernetes.io/name` is specified with some value.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: require-labelsannotations:policies.kyverno.io/title: Require Labelspolicies.kyverno.io/category: Best Practicespolicies.kyverno.io/minversion: 1.6.0policies.kyverno.io/severity: mediumpolicies.kyverno.io/subject: Pod, Labelpolicies.kyverno.io/description: Define and use labels that identify semantic attributes of your application or Deployment. A common set of labels allows tools to work collaboratively, describing objects in a common manner that all tools can understand. The recommended labels describe applications in a way that can be queried. This policy validates that the label `app.kubernetes.io/name` is specified with some value.spec:validationFailureAction: Auditbackground: truerules:- name: check-for-labelsmatch:any:- resources:kinds:- Podvalidate:message: The label `app.kubernetes.io/name` is required.pattern:metadata:labels:app.kubernetes.io/name: "?*"
This policy prevents the use of the default project in an Application.
This policy ensures that the name of the ApplicationSet is the same value provided in the project.
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.