apiVersion: constraints.gatekeeper.sh/v1beta1
kind: GkRegionValueMismatch
metadata:
  name: regionvaluemismatch
  labels:
    on-prod-ui: 'true'
spec:
  enforcementAction: deny
  match: {{ include "match_active_helm_releases" . | indent 4 }}
  parameters:
    helmManifestParserURL: {{ quote .Values.helm_manifest_parser_url }}
    region: {{.Values.global.region | required ".Values.global.region not found"}}

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: GkRegionValueMismatch
metadata:
  name: regionvaluemismatch
  labels:
    on-prod-ui: 'true'
spec:
  enforcementAction: {{ if and (.Values.global.region | hasPrefix "qa-") (eq .Values.cluster_type "baremetal" "scaleout") -}} deny {{- else -}} dryrun {{- end }} # TODO: enable everywhere (only qa for now for testing)
  match: {{ include "match_active_helm_releases" . | indent 4 }}
  parameters:
    helmManifestParserURL: {{ quote .Values.helm_manifest_parser_url }}
    region: {{.Values.global.region | required ".Values.global.region not found"}}

Revert "gatekeeper: enable GkRegionValueMismatch everywhere"
Revert "gatekeeper: enable GkRegionValueMismatch everywhere"

This reverts commit 03497426ddabf80d168202a8cb20206dd9e0075f.

I have to tune the helm-manifest-parser first.
