{{- range $app := .Values.argocdApplications -}} {{ if not .disable }} apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: {{ .name }} namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io spec: project: {{ $.Values.global.spec.project }} source: repoURL: {{ $.Values.global.spec.source.repoURL }} targetRevision: {{ default $.Values.global.spec.source.targetRevision .targetRevision }} path: {{ .name }} {{- if default $.Values.global.helmDefault .helm }} helm: valueFiles: - {{ $.Values.global.valuesFile }} {{- end }} destination: namespace: {{ default $.Values.global.spec.destination.namespace .namespace }} server: {{ $.Values.global.spec.destination.server }} syncPolicy: {{- if not .disableAutomated }} automated: prune: false selfHeal: true allowEmpty: false {{- end }} syncOptions: - CreateNamespace=true --- {{- end }} {{- end }}