Archify Sync GitOps template

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.
This commit is contained in:
root-at-skic committed 2026-11-08 21:55:40 +02:00
commit e2adb79e2d
15 files changed
+572

No files matched your search

@@ -0,0 +1,34 @@
{% 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 %}
@@ -0,0 +1,37 @@
{% 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 %}
@@ -0,0 +1,37 @@
{% macro render() %}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: 0150-archify-sync-storage
namespace: {{ argocd.get('namespace', 'argocd') }}
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
# Before the server: its database needs the claim this app makes.
argocd.argoproj.io/sync-wave: "0"
spec:
project: {{ argocd.get('project', 'default') }}
# The database volume: a static NFS volume, an export owned by uid 70.
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/0150-archify-sync-storage
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 %}
@@ -0,0 +1,44 @@
{% 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 %}