Files
homelab/k8s/argocd/apps/70-poimen.yaml
T

85 lines
3.3 KiB
YAML
Raw Normal View History

# Poimen — unified ArgoCD Application (wave 7).
#
# Consolidates what was previously five separate apps:
# poimen → source 1 (poimen-workflows workers)
# poimen-workflows → duplicate of source 1 (deleted)
# poimen-memory → source 2 (memory service + redis)
# poimen-memory-app → duplicate of source 2 (deleted)
# poimen-memory-database → source 3 (CNPG cluster, moved to k8s/infra/poimen)
#
# poimen-toolkit is intentionally kept as a separate Application because it
# manages cluster-scoped CRDs (ToolDefinition). A bad CRD can affect the
# whole cluster; keeping it separate means it has its own sync history,
# independent rollback, and can be paused without touching app workloads.
#
# Sync ordering via argocd sync-wave annotations:
# wave -1 → DB (CNPG Cluster) — must be Ready before app pods start
# wave 0 → all application Deployments (default)
#
# Image Updater tracks all four images. Write-back via argocd (in-cluster
# annotation patch — no git commit per image update).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: poimen
namespace: argocd
labels:
app.kubernetes.io/part-of: poimen
annotations:
argocd.argoproj.io/sync-wave: "7"
# ── Image promotion ──────────────────────────────────────────────────────
# Forgejo package webhook → api-gw patches kustomize.images per source.
# Source index mapping: 0=workflows, 1=memory, 3=frontend.
# Replaced ArgoCD Image Updater (removed 2026-09-10).
spec:
project: homelab
# Multi-source: each repo owns its own k8s manifests.
# ArgoCD syncs all sources in parallel; sync-wave annotations on individual
# resources control ordering within the sync operation.
sources:
# 1. Workers — Temporal activity + workflow workers, pi-worker pool
- repoURL: https://forgejo.riotpiao.com/riotpiao-poimen/poimen-workflows.git
targetRevision: main
path: k8s
# 2. Memory service — poimen-memory API, Redis cache, NetworkPolicies
- repoURL: https://forgejo.riotpiao.com/riotpiao-poimen/poimen-memory.git
targetRevision: main
path: k8s/app
# 3. Database infrastructure — CNPG Postgres cluster (wave -1)
# Moved from k8s/infra/databases to isolate poimen DB from other tenants.
- repoURL: https://forgejo.riotpiao.com/riotpiao-poimen/homelab.git
targetRevision: main
path: k8s/infra/poimen
# 4. Frontend app manifests — Deployment, Service, NetworkPolicy.
# Each repo owns its own k8s/ (same pattern as homelab-frontend for api-gw).
- repoURL: https://forgejo.riotpiao.com/riotpiao-poimen/poimen-frontend.git
targetRevision: main
path: k8s
# 5. Frontend ingress — poimen.riotpiao.com edge route.
# Lives in homelab (same pattern as k8s/apps/api/ for api-gw).
- repoURL: https://forgejo.riotpiao.com/riotpiao-poimen/homelab.git
targetRevision: main
path: k8s/apps/poimen-frontend
destination:
server: https://kubernetes.default.svc
namespace: poimen
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- SkipDryRunOnMissingResource=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m