Commit Graph
36 Commits
Author SHA1 Message Date
arcodangeandClaude Opus 5 b92da95701 docs(adr) — stockage objet MinIO : qui déclare quoi, et qui détient quoi
Trois questions indépendantes, tranchées lors du branchement de Kadans sur
MinIO (2026-07-26) : qui déclare les buckets d'une app, qui détient les
identifiants capables de les créer, et comment l'app lit les siens.

La décision de fond est du fondateur : CHACUN SON PÉRIMÈTRE. Une application
déclare ses buckets depuis son propre dépôt ; `tools` fournit le serveur, un
module de standardisation et un compte de provisionnement — pas la liste. Une
première version faisait tout porter par l'infra partagée : à ce rythme, chaque
bucket de chaque app devenait une PR sur le dépôt commun.

L'ADR consigne aussi les trois identités et leurs portées (root / provisionneur
/ compte de service), pourquoi la lecture des identifiants est une propriété
inconditionnelle de la plateforme plutôt qu'une déclaration par app, et pourquoi
les octets ne transitent pas par l'API — avec les conséquences que ça impose
(endpoint public, CORS aux origines exactes, pas de basic-auth sur l'ingress S3).

Les alternatives écartées sont listées avec leur motif, dont deux que j'avais
moi-même proposées et qui étaient plus faibles.

Deux limites assumées y figurent : le provisionneur est un secret PARTAGÉ entre
rôles CI (sa compromission permet de créer des buckets, pas de lire des objets),
et les noms d'actions d'administration MinIO n'ont pas été éprouvés contre le
serveur au moment d'écrire.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CoafGWmRVESaWX819USUUA
2026-07-26 10:19:48 +02:00
arcodangeandClaude Fable 5 73bf7d1170 fix(argocd): url-shortener enfin syncable — ignorer le volumeName épinglé de son PVC
L'app url-shortener était en SyncError permanent : son PVC live porte un
spec.volumeName épinglé (rebind du volume Longhorn après le drill coupure de
courant) absent du chart ; chaque sync tentait donc de le vider, refus API
(spec immuable après création), échec en boucle malgré automated+selfHeal.

- apps.yaml : passthrough générique ignoreDifferences + syncOptions par app.
- values.yaml : url-shortener ignore /spec/volumeName du PVC, avec
  RespectIgnoreDifferences=true pour que l'apply réinjecte la valeur live au
  lieu de la vider (le cas d'usage documenté d'ArgoCD pour les champs
  immuables).

Rendu helm vérifié : seule l'Application url-shortener change.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-25 10:47:34 +02:00
arcodangeandClaude Opus 4.8 1365c95c2f feat(argocd) — enregistre kadans-api (app-of-apps, namespace kadans)
Ajoute l'API cœur au registre gitea_applications. ArgoCD crée une Application
`kadans-api` (source arcodange/kadans-api, path chart, targetRevision HEAD), sync
automatique prune+selfHeal, image-updater par digest sur :latest — même moule que
les autres apps.

Namespace `kadans` (comme kadans-jobs) : kadans-api partage le stack Vault/DB déjà
en place pour l'app front (VaultAuth `kadans`, rôle Postgres dynamique
postgres/creds/kadans, ServiceAccount `kadans`, policy KV `kadans`). Aucun nouvel
iac/DB/Vault à provisionner.

À merger APRÈS le fix chart kadans-api (VaultAuth + hôte DB pgbouncer.tools) pour
que la première synchro ArgoCD parte d'un chart correct.

helm template rend l'Application kadans-api → repoURL arcodange/kadans-api,
namespace kadans, CreateNamespace, digest.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_013ws8L74dVZmp97Wu36fm8j
2026-07-24 10:28:28 +02:00
arcodange 1f22669ac6 feat(argocd): apps override destination namespace; kadans-jobs → kadans (#38)
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-07-20 10:23:34 +02:00
arcodange 342026a3d9 fix(argocd): stop the document separator gluing itself to the last chart value (#37)
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-07-20 09:22:49 +02:00
arcodange 34c1ad697f fix(argocd): let the image-updater trust the lab CA — the last blocker to rollouts (#36)
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-07-20 09:11:25 +02:00
arcodangeandClaude Opus 4.8 d3261bc8c4 feat(argocd): enroll kadans-jobs — the Kadans analysis-jobs façade (#35)
kadans-jobs is the tier-2 (homelab, 24/7) piece of the Kadans topology: a job
queue plus the store of published analysis results, decoupling the product from
the volatile Mac worker.

org: arcodange — the repo does not live under the default arcodange-org.
Digest-based image-updater annotations follow the fleet pattern; the
cluster-wide ImageUpdater CR (namePattern "*", useAnnotations) picks them up,
so there is no per-app CR to maintain. The image is already in the registry.

No postgres/iac/terraform.tfvars entry, on purpose: the façade runs a memory
store in v0, so it needs neither a database nor Vault. That is the runbook's
degraded mode — the DB, the Vault JWT role and the app's own iac/ will land
together with the Postgres store.

Chart realigned on the runbook conventions first, in kadans-jobs#1.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013ws8L74dVZmp97Wu36fm8j
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-07-20 09:07:44 +02:00
arcodange 655ef61fc5 fix(argocd): restore fleet image rollouts — image-updater v1 needs an ImageUpdater CR (#34)
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-07-20 08:58:47 +02:00
arcodangeandClaude Fable 5 a4be009e3e chore(argocd): retire le bloc repoServer mort des values image-updater
Ajouté par bda53f29 pour « monter les credentials dans le repo-server »,
mais ces values sont passées au chart argocd-image-updater (HelmChart
kube-system) qui n'a pas de clé repoServer : no-op intégral. Le vrai
repo-server ArgoCD est déployé par l'addon k3s et n'a pas besoin de ce
montage — les credentials repo passent par les secrets étiquetés
argocd.argoproj.io/secret-type.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 20:37:58 +02:00
arcodangeandClaude Fable 5 3698ab3c73 fix(argocd): retire usernameSecret/passwordSecret de spec.source — champs inexistants du CRD Application
Ces champs (commit 7aa789d1) n'existent pas dans le schéma Application
d'ArgoCD : l'API server les élague à l'apply, d'où un diff permanent →
factory OutOfSync en boucle (296 tentatives selfHeal) sur kadans,
telegram-gateway et dance-lessons-coach. L'authentification aux repos
privés passe par un secret repo-creds (label
argocd.argoproj.io/secret-type: repo-creds, url préfixe
https://gitea.arcodange.lab/arcodange) — corrigé côté cluster sur le
secret gitea-credentials existant.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 20:37:29 +02:00
arcodange bda53f299a fix: monter credentials dans repo-server 2026-07-13 19:15:40 +02:00
arcodange 7aa789d1cf fix: ajouter credentials gitea pour repos privés 2026-07-13 19:07:15 +02:00
arcodange 1d477a4c6e fix: corriger organisation kadans vers arcodange 2026-07-13 19:05:05 +02:00
arcodange 3f1df060a2 feat: ajouter kadans à argocd et postgres 2026-07-13 18:55:04 +02:00
arcodange 5a80ec32ae Merge pull request 'feat(argocd): onboard prospection dans l'app-of-apps' (#20) from arcodange/onboard-prospection into main 2026-07-08 17:02:39 +02:00
arcodangeandClaude Opus 4.8 5957439f9f feat(argocd): onboard prospection dans l'app-of-apps
Ajoute prospection à gitea_applications → ArgoCD Application (repoURL
arcodange-org/prospection, path chart, namespace prospection) + image-updater
(digest) sur gitea.arcodange.lab/arcodange-org/prospection:latest.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-08 15:38:45 +02:00
arcodangeandClaude Opus 4.7 90498e4f55 feat(multi-env): Phase D4 — register erp-sandbox ArgoCD Application
ADR-0002 Phase D, final step. Adds `envs: { sandbox: {} }` to the erp entry
in argocd/values.yaml, so the Phase B per-env loop in templates/apps.yaml
renders an extra Application "erp-sandbox":
  - source: same erp repo + chart, overlaid with values.yaml + values-sandbox.yaml
  - destination namespace: erp-sandbox (CreateNamespace=true)
  - syncPolicy: automated prune + selfHeal (default)

GitOps activation: on merge to main, the factory app-of-apps re-renders and
ArgoCD creates the erp-sandbox Application, which deploys the Dolibarr chart
into the erp-sandbox namespace. The pod's VSO reads the Vault paths created in
D2/D3 (auth/kubernetes/role/erp-sandbox, postgres/creds/erp-sandbox,
kvv2/erp-sandbox/config) and connects to the erp-sandbox DB created in D1.

Render verified: the only diff vs main is the added erp-sandbox Application;
prod erp + all other apps render byte-identical.

No DNS/TLS change needed (Phase E): *.arcodange.lab is a wildcard in Pi-hole
(CoreDNS forwards to it) and cert-manager holds a *.arcodange.lab wildcard set
as Traefik's default TLS — so erp-sandbox.arcodange.lab resolves + gets HTTPS
automatically once the ingress is up.

Completes Phase D. D1=factory#17, D2=tools#3, D3=erp#12 (all merged).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-06-28 18:35:48 +02:00
arcodangeandClaude Opus 4.7 c00c4cdd5c feat(multi-env): Phase B — make factory machinery env-capable (no activation)
ADR-0002 Phase B. Makes postgres/iac, argocd, and the conventions docs
multi-environment-capable WITHOUT activating any sandbox yet — every app
stays prod-only, so this change is behaviour-neutral:
  - postgres/iac `tofu plan` is a no-op (proven: the elision flatten keys
    are bare app names, db=<app>, role=<app>_role — identical addresses)
  - the argocd apps.yaml render is byte-identical (181→181 lines, diff
    empty) since no app declares `envs`

postgres/iac:
- variables.tf: `applications` becomes set(object({name, envs=optional(["prod"])}))
- main.tf: a `local.app_instances` flatten of applications × envs keyed by the
  elided instance id (env=prod → "<app>"); per-app resources iterate it and
  reference each.key / each.value.{database,role}. For prod-only apps every
  resource address + attribute is unchanged. (main.tf also got a full
  `tofu fmt` pass — the pgbouncer function block reindents 4→2 spaces, which
  is cosmetic; the correctness gate is the CI tofu plan, not the text diff.)
- terraform.tfvars: string entries → { name = "..." } objects.

argocd/templates/apps.yaml:
- after the prod Application, a `range $app_attr.envs` loop renders one extra
  Application per non-prod env: name/namespace `<app>-<env>`, shared repoURL,
  helm.valueFiles [values.yaml, values-<env>.yaml], per-env syncPolicy override.
  Renders nothing while no app sets `envs` → prod render unchanged.

docs:
- doc/runbooks/new-web-app/conventions.md (FR, authoritative): new section
  "Plusieurs environnements pour une même app" — elision rule, suffix rule,
  snake-case owner-role exception, erp/erp-sandbox table, ADR-0002 link.
- vibe/guidebooks/lab-ecosystem/naming-conventions.md (EN mirror): the env
  coordinate section + a "Two sandbox models" section reconciling the
  separate-cluster (ADR-0001, names repeat) vs in-cluster sibling (ADR-0002,
  <env> suffix) strategies; Last Updated bumped; ADR-0002 cross-links.

Activation (erp gets envs=["prod","sandbox"] in postgres tfvars + argocd
values + erp/iac) is Phase D, gated by its own plan review.

Refs ADR-0002 (factory#15). Phase A = tools#2 (merged). Phase C = erp#11 (merged).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-06-28 16:28:28 +02:00
arcodange 3fb7544351 argocd: rename homelab-gateway → telegram-gateway
Aligns with the upstream repo rename
(arcodange/homelab-gateway → arcodange/telegram-gateway) so the name
matches the public URL tg.arcodange.fr and Arcodange's naming
conventions.
2026-05-09 12:35:37 +02:00
arcodange 5038956332 argocd: add homelab-gateway application
Adds the homelab-gateway Argo CD Application pointing at
arcodange/homelab-gateway (user space, like dance-lessons-coach).

Image Updater watches gitea.arcodange.lab/arcodange/homelab-gateway:latest
with digest strategy.

Phase 1 of the Telegram webhook gateway — a long-running pod that
receives webhooks (no more polling) and routes per-bot to handler
implementations. Initial bot: @arcodange_factory_bot, slug=factory,
echo handler.
2026-05-09 12:25:30 +02:00
arcodange a3526e51f8 Merge remote-tracking branch 'origin/main' 2026-05-06 12:58:01 +02:00
arcodangeandClaude Opus 4.7 f114d7e6f0 feat(argocd): allow per-app syncPolicy override in values.yaml
The apps template hardcoded automated{prune,selfHeal} for every app. Some
apps (e.g. tools, where Vault unseal is manual) need a custom syncPolicy
without selfHeal. Read $app_attr.syncPolicy when set, fall back to the
existing automated default otherwise. Use the override on `tools` to keep
the existing behavior explicit.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-06 12:55:49 +02:00
arcodange 0ce004cc6a 🤖 ci(argocd): enroll dance-lessons-coach + per-app org override in apps template (#1)
Co-authored-by: Gabriel Radureau <[email protected]>
Co-committed-by: Gabriel Radureau <[email protected]>
2026-05-06 08:01:50 +02:00
arcodange 5b3c896a25 use self signed cert for internal domain arcodange.lab 2025-12-31 17:38:04 +01:00
arcodange 74b8676244 auto upgrade webapp image 2025-12-23 14:20:56 +01:00
arcodange 83410d9eb1 set cms application argo image updater strategy 2025-10-09 16:12:31 +02:00
arcodange fa5bc7e30e deploy argocd image updater 2025-10-09 15:01:05 +02:00
arcodange c19cf7eced register cms argo application 2025-09-09 09:04:18 +02:00
arcodange 6d3adb5834 setup cron local mail reporting and longhorn recurring backup job 2025-09-08 13:25:02 +02:00
arcodange 2d4cb5d8a5 setup gcs backup bucket for longhorn 2025-08-31 21:21:03 +02:00
arcodange 66e9ec5091 ERP: declare argocd app and postgresql database 2024-11-04 12:58:49 +01:00
arcodange 5beaee60ac argocd: add webapp app 2024-09-29 17:55:19 +02:00
arcodange aa127b53ec reference tool repo 2024-08-29 14:42:20 +02:00
arcodange 955006dd5d changed app path from argocd to chart 2024-08-27 10:14:33 +02:00
arcodange f15bdb707e simple helm chart for url-shortener app 2024-08-23 13:45:25 +02:00
arcodange 3b4140a0c1 deploy argo cd 2024-08-21 18:46:41 +02:00