built-in-references/Kubernetes/ingress-hostnames-conflict/constraint.yaml (10 lines of code) (raw):

apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sAzureUniqueIngressHost metadata: name: ingress-hostnames-conflict spec: match: excludedNamespaces: {{ .Values.excludedNamespaces }} kinds: - apiGroups: ["extensions", "networking.k8s.io"] kinds: ["Ingress"]