apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  kustomize.version.default: /usr/local/bin/kustomize
  users.anonymous.enabled: "true"
  resource.compareoptions: |
    # disables status field diffing in specified resource types
    # 'crd' - CustomResourceDefinition-s (default)
    # 'all' - all resources
    # 'none' - disabled
    ignoreResourceStatusField: crd
  # Taken from https://nemo83.dev/posts/argocd-istio-operator-bootstrap/
  resource.customizations: |
    admissionregistration.k8s.io/MutatingWebhookConfiguration:
      ignoreDifferences: |
        jsonPointers:
        - /webhooks/0/clientConfig/caBundle
    install.istio.io/IstioOperator:
      health.lua: |
        hs = {}
        if obj.status ~= nil then
          if obj.status.status == "HEALTHY" then
            hs.status = "Healthy"
            hs.message = "IstioOperator Ready"
            return hs
          end
        end

        hs.status = "Progressing"
        hs.message = "Waiting for IstioOperator"
        return hs

