{% macro render() %} --- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: 0200-archify-sync namespace: {{ argocd.get('namespace', 'argocd') }} finalizers: - resources-finalizer.argocd.argoproj.io annotations: argocd.argoproj.io/sync-wave: "1" spec: project: {{ argocd.get('project', 'default') }} # Archify Sync: the chart from the server repository, the values from this one. # One pod by design (the live copy of each model is held by one server), so # updates are Recreate; editors work offline for those seconds and catch up. sources: - repoURL: {{ archify_sync.get('chart_repo', 'https://gitea.lego-cloud.eu/vscode-extensions/archify-vscode-ext-sync.git') }} targetRevision: {{ archify_sync.get('chart_revision', 'main') }} path: {{ archify_sync.get('chart_path', 'charts/archify-sync') }} helm: # The release name is part of the database URL in the ExternalSecret (0100). releaseName: archify-sync valueFiles: - $values/cluster/0500-resources/0200-archify-sync/archify-sync/values.yml - repoURL: {{ argocd.get('repo_url', 'https://git.example.com/you/archify-sync-gitops.git') }} targetRevision: {{ argocd.get('target_revision', 'HEAD') }} ref: values destination: server: {{ argocd.get('destination_server', 'https://kubernetes.default.svc') }} namespace: {{ archify_sync.get('namespace', 'archify-sync') }} syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true {% endmacro %} {%- set result = render() -%} {%- for line in result.split('\n') -%} {% if line | trim | length != 0 -%} {{ line }} {% endif %} {%- endfor %}