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.
38 lines
1.2 KiB
Django/Jinja
38 lines
1.2 KiB
Django/Jinja
{% macro render() %}
|
|
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: 0100-archify-sync-secrets
|
|
namespace: {{ argocd.get('namespace', 'argocd') }}
|
|
finalizers:
|
|
- resources-finalizer.argocd.argoproj.io
|
|
annotations:
|
|
# Before the server: its pods need the Secret this app makes.
|
|
argocd.argoproj.io/sync-wave: "0"
|
|
spec:
|
|
project: {{ argocd.get('project', 'default') }}
|
|
# The server's secrets from your secret store through External Secrets.
|
|
source:
|
|
repoURL: {{ argocd.get('repo_url', 'https://git.example.com/you/archify-sync-gitops.git') }}
|
|
targetRevision: {{ argocd.get('target_revision', 'HEAD') }}
|
|
path: cluster/0500-resources/0100-archify-sync-secrets
|
|
directory:
|
|
recurse: true
|
|
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 %}
|