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

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