Document, as a tree-docs tree, the end-to-end procedure to stand up a new web application on the Arcodange platform — a mechanic spread across the factory, tools and app repos with non-trivial ordering dependencies. Covers: Gitea repo creation (org-secret inheritance), Postgres DB + owner role (factory/postgres/iac), platform Vault declaration (gitea_cicd_<app> + policies, tools/hashicorp-vault/iac), the app Helm chart (VSO dynamic secrets via pgbouncer), the app Terraform (app_roles module), the CI workflows (tofu apply + image build, incl. the copy-pasted role pitfall), and ArgoCD registration (factory/argocd/values.yaml). Adds a naming- conventions concept page and an ordered checklist. Wires the legacy doc/adr "setup hello world web app" item and the factory README to the runbook. New docs live under doc/ (singular) per the PR #8 convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.9 KiB
Factory > Doc > Runbooks > Nouvelle application web > 7. Enregistrement ArgoCD
7. Enregistrer l'app dans ArgoCD
Status: ✅ Active Upstream: 4. Chart Helm, 6. Workflows CI Related: Conventions de nommage · Checklist
Summary
ArgoCD fonctionne en app-of-apps : le chart factory/argocd lit une liste d'applications dans son values.yaml et génère une ressource Application par entrée. Enregistrer l'app = ajouter son nom à cette liste. ArgoCD se charge ensuite de cloner le dépôt, déployer chart/ dans le namespace <app>, et resynchroniser à chaque push.
Action
Ajouter <app> sous gitea_applications dans factory/argocd/values.yaml :
gitea_applications:
webapp: { … }
erp:
annotations: {}
<app>: # ← cas simple
annotations: {}
Variante avec auto-déploiement sur nouvelle image (recommandé pour une image maison) :
<app>:
annotations:
argocd-image-updater.argoproj.io/image-list: <app>=gitea.arcodange.lab/arcodange-org/<app>:latest
argocd-image-updater.argoproj.io/<app>.update-strategy: digest
Options supplémentaires :
| Champ | Quand l'utiliser | Effet |
|---|---|---|
org: arcodange |
dépôt hors arcodange-org |
change le repoURL (défaut arcodange-org) |
syncPolicy: … |
contrôle manuel | surcharge la policy (défaut : automated {prune, selfHeal}) |
Ce que ça génère
Le template argocd/templates/apps.yaml rend, pour chaque entrée :
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: <app>
namespace: argocd
spec:
project: default
source:
repoURL: https://gitea.arcodange.lab/arcodange-org/<app> # <org> = arcodange-org par défaut
targetRevision: HEAD
path: chart # ← d'où l'exigence du dossier chart/
destination:
server: https://kubernetes.default.svc
namespace: <app> # = nom de l'app
syncPolicy:
automated: { prune: true, selfHeal: true }
syncOptions: [ CreateNamespace=true ] # le namespace est créé tout seul
%%{init: {'theme': 'base'}}%%
flowchart LR
classDef gitops fill:#7c3aed,stroke:#6d28d9,color:#fff
classDef k8s fill:#2563eb,stroke:#1e40af,color:#fff
VAL["values.yaml<br>gitea_applications.‹app›"]:::gitops --> APP["Application ArgoCD<br>‹app›"]:::gitops
APP -->|"path: chart, HEAD"| SYNC["sync du dépôt<br>arcodange-org/‹app›"]:::gitops
SYNC --> NS["namespace ‹app›<br>(CreateNamespace=true)"]:::k8s
NS --> DEP["Deployment + Service + Ingress + CRD Vault"]:::k8s
Notes / contraintes
Important
path: chartetnamespace: <app>sont déduits du nom, pas configurables par entrée. C'est pourquoi le dossier doit s'appelerchart/(étape 1) et le nom doit être cohérent partout (conventions).
- Le chart
factory/argocdest lui-même réconcilié par ArgoCD (app-of-apps racine) : committervalues.yamlsurmainsuffit à faire apparaître/synchroniser la nouvelleApplication. Pas dekubectl applymanuel. prune: true+selfHeal: true: ArgoCD supprime ce qui n'est plus dans le chart et réécrase les dérives manuelles. En tenir compte avant toutkubectl edit.
Related
- 4. Chart Helm — le contenu déployé (le dossier
chart/). - 6. Workflows CI — les annotations
argocd-image-updatercollaborent avec l'image poussée. - 8. Checklist — vérifier que l'
ApplicationpasseHealthy/Synced.