{{- if and (.Values.thanos) (.Values.thanos.enable) -}} apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: thanos namespace: {{ .Values.argoNamespace | default "argocd" }} finalizers: - resources-finalizer.argocd.argoproj.io spec: project: {{ .Values.argoProject | default "default" }} source: repoURL: {{ .Values.repoUrl }} path: add-ons/thanos targetRevision: {{ .Values.targetRevision }} helm: values: | thanos: {{- toYaml .Values.thanos | nindent 10 }} destination: server: {{ .Values.destinationServer | default "https://kubernetes.default.svc" }} namespace: thanos syncPolicy: automated: prune: true syncOptions: - CreateNamespace=true retry: limit: 1 backoff: duration: 5s factor: 2 maxDuration: 1m {{- end -}}