apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
data:
#  admin.enabled: 'false'
  statusbadge.enabled: 'true'
  application.instanceLabelKey: argocd.argoproj.io/instance
  repositories: |
    - name: Crumblecog-core
      type: git
      url: https://github.com/crumbhole/crumblecog-core
  url: https://argocd.<crumblecog:domain>
  resource.customizations: |
    admissionregistration.k8s.io/ValidatingWebhookConfiguration:
      ignoreDifferences: |
        jsonPointers:
        - /webhooks/0/namespaceSelector/matchExpressions
    admissionregistration.k8s.io/ValidatingWebhookConfiguration:
      ignoreDifferences: |
        jsonPointers:
        - /webhooks/0/namespaceSelector/matchExpressions
  resource.exclusions: |
    - apiGroups:
      - "velero.io"
      kinds:
      - Backup
      clusters:
      - "*"
  configManagementPlugins: |-
    - name: argocd-vault-replacer
      generate:
        command: ["argocd-vault-replacer"]
    - name: crumblecog
      generate:
        command: ["crumblecog-plugin | argocd-vault-replacer"]
    - name: kustomize-argocd-vault-replacer
      generate:
        command: ["sh", "-c"]
        args: ["kustomize build . | argocd-vault-replacer"]
    - name: kustomize-crumblecog
      generate:
        command: ["sh", "-c"]
        args: ["kustomize build . | crumblecog-plugin | argocd-vault-replacer"]
    - name: helm-argocd-vault-replacer
      init:
        command: ["/bin/sh", "-c"]
        args: ["helm dependency build"]
      generate:
        command: [sh, -c]
        args: ["helm template -n $ARGOCD_APP_NAMESPACE $ARGOCD_APP_NAME . | argocd-vault-replacer"]
    - name: helm-crumblecog
      init:
        command: ["/bin/sh", "-c"]
        args: ["helm dependency build"]
      generate:
        command: [sh, -c]
        args: ["helm template -n $ARGOCD_APP_NAMESPACE $ARGOCD_APP_NAME . | crumblecog-plugin | argocd-vault-replacer"]
