{{- if .Values.dapr.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: dapr
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: dapr-system
    server: https://kubernetes.default.svc
  project: default
  syncPolicy:
    # managedNamespaceMetadata:
    #   labels:
    #     component: aux
    syncOptions:
      - CreateNamespace=true
      - ApplyOutOfSyncOnly=true
    automated:
      prune: true
      selfHeal: true
  sources:
  - repoURL:  https://dapr.github.io/helm-charts/
    targetRevision: 1.14.4
    chart: dapr
    helm:
      values: |
        global:
          ha:
            enabled: true
{{- end }}
