refactor(argocd): replace wave/layer/phase schemes with two-phase bootstrap + app-of-apps and document both CD scopes — fixes self-hosted-git chicken-egg and stale paths

This commit is contained in:
Story Crater Bot
2026-07-20 08:22:53 -07:00
parent 15b1ec6ad4
commit c759481ea6
13 changed files with 774 additions and 13 deletions
+43
View File
@@ -0,0 +1,43 @@
# Wave 0 — networking policies layered on the Cilium CNI + CoreDNS that the
# cluster bootstrap already installed (substrate). These are raw manifests only.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cilium-policy
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/bootstrap/cilium
destination:
server: https://kubernetes.default.svc
namespace: kube-system
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: coredns-config
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/bootstrap/coredns
destination:
server: https://kubernetes.default.svc
namespace: kube-system
syncPolicy:
automated:
prune: true
selfHeal: true
@@ -0,0 +1,135 @@
# Wave 1 — MinIO (operator + tenant), Longhorn policy, Prometheus stack.
# Helm charts pull from public repos; values come from the git repo via a
# second "ref: values" source (ArgoCD multi-source pattern).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: minio-operator
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: homelab
sources:
- repoURL: https://charts.min.io/
chart: operator
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/infrastructure/minio/minio-operator-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: storage
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
# Tenant + buckets + replication are raw CRs (MinIO Tenant CRD from operator).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: minio-tenant
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/infrastructure/minio
destination:
server: https://kubernetes.default.svc
namespace: storage
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
# Longhorn itself is substrate (bootstrap-installed); this app manages only its
# ServiceMonitor / policy manifests.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: longhorn-config
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/infrastructure/longhorn
destination:
server: https://kubernetes.default.svc
namespace: longhorn-system
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: prometheus
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: homelab
sources:
- repoURL: https://prometheus-community.github.io/helm-charts
chart: kube-prometheus-stack
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/platform/monitoring/prometheus-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: monitoring
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: blackbox-exporter
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: homelab
sources:
- repoURL: https://prometheus-community.github.io/helm-charts
chart: prometheus-blackbox-exporter
targetRevision: "~11"
helm:
valueFiles:
- $values/k8s/platform/monitoring/blackbox-exporter-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: monitoring
syncPolicy:
automated:
prune: true
selfHeal: true
+87
View File
@@ -0,0 +1,87 @@
# Wave 2 — Loki / Grafana / Promtail (Grafana Helm charts).
# NOTE: loki-values / grafana-values reference secrets (S3 creds, admin password)
# that helmfile used to inject via --set. Under ArgoCD these come from the
# *.enc.yaml SOPS files in the same dir via the SOPS plugin — verify the plugin
# is configured before first sync, or these will render with empty secrets.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: loki
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
project: homelab
sources:
- repoURL: https://grafana.github.io/helm-charts
chart: loki
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/platform/logging/loki-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: logging
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: grafana
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
project: homelab
sources:
- repoURL: https://grafana.github.io/helm-charts
chart: grafana
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/platform/logging/grafana-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: logging
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: promtail
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
project: homelab
sources:
- repoURL: https://grafana.github.io/helm-charts
chart: promtail
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/platform/logging/promtail-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: logging
syncPolicy:
automated:
prune: true
selfHeal: true
+102
View File
@@ -0,0 +1,102 @@
# Wave 3 — Vault + Authentik (identity), plus IAM raw jobs and the Forgejo
# runner. Authentik/Vault values reference SOPS-managed secrets (see *.enc.yaml
# in k8s/security/iam) resolved by the ArgoCD SOPS plugin at sync time.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: vault
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: homelab
sources:
- repoURL: https://helm.releases.hashicorp.com
chart: vault
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/security/iam/vault-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: iam
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: authentik
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: homelab
sources:
- repoURL: https://charts.goauthentik.io
chart: authentik
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/security/iam/authentik-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: iam
syncPolicy:
automated:
prune: true
selfHeal: true
---
# Raw IAM manifests: key-rotation cronjob + authentik migration job.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: iam-jobs
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/security/iam
destination:
server: https://kubernetes.default.svc
namespace: iam
syncPolicy:
automated:
prune: true
selfHeal: true
---
# Forgejo runner (local chart). Forgejo itself is Phase 0 (bootstrap).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: forgejo-runner
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/security/ci-cd/charts/forgejo-runner
destination:
server: https://kubernetes.default.svc
namespace: cicd
syncPolicy:
automated:
prune: true
selfHeal: true
+23
View File
@@ -0,0 +1,23 @@
# Wave 4 — Database schemas + init jobs. The CNPG operator and the ddb-cluster
# itself are Phase 0 (bootstrap); this app manages the additional schemas and
# the one-shot init job that seed databases for Authentik / Temporal / Vault.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: data-schemas
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "4"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/data
destination:
server: https://kubernetes.default.svc
namespace: ddb
syncPolicy:
automated:
prune: true
selfHeal: true
+111
View File
@@ -0,0 +1,111 @@
# Wave 5 — Kafka (Strimzi operator + cluster CR), Redis, and the SQS-like
# queue services. Strimzi/Redis are public Helm charts; kafka-cluster/queue-crd/
# management-service are local charts (rendered from their own Chart.yaml).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: strimzi-operator
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "5"
spec:
project: homelab
source:
repoURL: https://strimzi.io/charts/
chart: strimzi-kafka-operator
targetRevision: 0.46.0
helm:
releaseName: strimzi-operator
destination:
server: https://kubernetes.default.svc
namespace: sqs
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kmsvc-redis
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "5"
spec:
project: homelab
source:
repoURL: https://charts.bitnami.com/bitnami
chart: redis
targetRevision: 20.6.0
destination:
server: https://kubernetes.default.svc
namespace: sqs
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kafka-cluster
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "6"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/applications/sqs/charts/kafka-cluster
destination:
server: https://kubernetes.default.svc
namespace: sqs
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: queue-crd
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "6"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/applications/sqs/charts/queue-crd
destination:
server: https://kubernetes.default.svc
namespace: sqs
syncPolicy:
automated:
prune: true
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: management-service
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "7"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/applications/sqs/charts/management-service
destination:
server: https://kubernetes.default.svc
namespace: sqs
syncPolicy:
automated:
prune: true
selfHeal: true
+107
View File
@@ -0,0 +1,107 @@
# Wave 8 — end-user workloads: Temporal, Portainer, and the two network
# helpers (cloudflared tunnel, duckdns updater) that are already running.
# Experimental dirs (llm, forge, dev-tools, shadowsocks) are intentionally
# NOT included yet — add them here once they're production-ready.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: temporal
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "8"
spec:
project: homelab
sources:
- repoURL: https://go.temporal.io/helm-charts
chart: temporal
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/applications/temporal/temporal-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: temporal
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: portainer
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "8"
spec:
project: homelab
sources:
- repoURL: https://portainer.github.io/k8s/
chart: portainer
targetRevision: "*"
helm:
valueFiles:
- $values/k8s/applications/portainer/portainer-values.yaml
- repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: dashboard
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cloudflared
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "8"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/applications/cloudflared
destination:
server: https://kubernetes.default.svc
namespace: cloudflared
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: duckdns
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "8"
spec:
project: homelab
source:
repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
targetRevision: main
path: k8s/applications/duckdns
destination:
server: https://kubernetes.default.svc
namespace: duckdns
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true