Argo CD Application Configuration¶
Namespace-aware parameter model¶
Use these parameters so the manifest can be reused for any entity namespace:
ENTITY_NAMESPACE: entity scope (example:france-titres)APP_SLUG: app identifier (example:hello-world)ARGO_PROJECT: Argo CD project (commonly same as entity namespace)HELM_REPO_URL: Git URL of Helm chart repositoryTARGET_REVISION: Git revision to deploy (HEAD, branch, or tag)
Generic Application template¶
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ${ENTITY_NAMESPACE}-${APP_SLUG}
spec:
destination:
namespace: ${ENTITY_NAMESPACE}
server: https://kubernetes.default.svc
source:
path: .
repoURL: ${HELM_REPO_URL}
targetRevision: ${TARGET_REVISION}
sources: []
project: ${ARGO_PROJECT}
Notes:
- This uses
spec.source(single source) and keepssources: []empty, matching your provided structure. - Namespace is explicitly set in
spec.destination.namespace.
Provided example (france-titres)¶
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: france-titres-hello-world
spec:
destination:
namespace: france-titres
server: https://kubernetes.default.svc
source:
path: .
repoURL: https://tools.playground.france-identite.gouv.fr/gitlab/plg/partners/france-titres/helm-hello-world.git
targetRevision: HEAD
sources: []
project: france-titres
How namespace is applied¶
Namespace is used in three places:
metadata.nameprefix (france-titres-...)spec.destination.namespace(france-titres)spec.project(france-titres)
This keeps ownership, target namespace, and Argo permissions aligned.
Alignment with current Helm chart¶
The referenced repo is the Helm chart repository (helm-hello-world-main in local workspace), whose templates include:
templates/deployment.yamltemplates/service.yamltemplates/virtualservice.yaml
Sources:
- helm-hello-world-main/templates/deployment.yaml
- helm-hello-world-main/templates/service.yaml
- helm-hello-world-main/templates/virtualservice.yaml
Verification checklist¶
- Application appears in Argo CD and status is
Synced. - Destination namespace matches entity namespace.
- Deployed resources exist in
${ENTITY_NAMESPACE}namespace. - VirtualService route is reachable for
/${ENTITY_NAMESPACE}/${APP_SLUG}/pattern.
Assumptions¶
- Argo CD project
france-titresexists and is authorized for this repo and namespace. - Repository credentials are configured in Argo CD for the Git URL.
Why: these controls are outside the two code repos and not represented in chart templates.