A Copier template for deploying Archify Sync with Argo CD: an app-of-apps, the server's Helm chart and its values, optional secrets through External Secrets and an optional static NFS volume for PostgreSQL.
35 lines
1.1 KiB
Django/Jinja
35 lines
1.1 KiB
Django/Jinja
{% macro render() %}
|
|
---
|
|
# The app-of-apps managing itself: the bootstrap copy is applied once, then this
|
|
# one (inside the recursed tree) 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 %}
|