{% macro render() %} --- # Applied once by hand (or by the connect step); after that the copy in # 0300-applications keeps it in step with git. Named apart from other # app-of-apps that share the Argo CD namespace. apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: 0000-archify-sync-app-of-apps namespace: {{ argocd.get('namespace', 'argocd') }} finalizers: - resources-finalizer.argocd.argoproj.io spec: project: {{ argocd.get('project', 'default') }} source: repoURL: {{ argocd.get('repo_url', 'https://git.example.com/you/archify-sync-gitops.git') }} targetRevision: {{ argocd.get('target_revision', 'HEAD') }} path: cluster/0300-applications directory: recurse: true destination: server: {{ argocd.get('destination_server', 'https://kubernetes.default.svc') }} namespace: {{ argocd.get('namespace', 'argocd') }} syncPolicy: automated: prune: true selfHeal: true {% endmacro %} {%- set result = render() -%} {%- for line in result.split('\n') -%} {% if line | trim | length != 0 -%} {{ line }} {% endif %} {%- endfor %}