Manage the ticketing apps from git
One Argo CD Application, root-app-ticket, watches argocd/apps/ in ticket-iac and also manages itself, so every
ticketing app is declared in git. For moving any other manually applied service under Argo CD, see
Put a service under ArgoCD management.
Before you start¶
- Shell access to
ticket-node-1, where you runkubectl, with a checkout ofticket-iacon branchupdate_queue. - Push access to
ticket-iac, branchupdate_queue. Commit messages use Conventional Commits (fix:,feat:).
How the root app is built¶
| File | What it holds |
|---|---|
argocd/root-app.yaml |
Two sources: path: argocd/apps (recurse) and path: argocd with directory.include: "root-app.yaml" (manages itself). syncPolicy.automated: {prune: true, selfHeal: true} |
argocd/apps/eticket-cms-production.yaml |
A child app: source overlays/prod, branch update_queue, retry.limit: 5 |
A new app is one more file in argocd/apps/.
Protect data from prune¶
Prune deletes anything that is no longer in git. root-app.yaml turns prune on as soon as you apply it, so protect the
data objects before the first kubectl apply.
overlays/prod/kustomization.yaml has patches that add argocd.argoproj.io/sync-options: Prune=false to:
- every
PersistentVolumeClaim - the CloudNativePG
Cluster(postgresql.cnpg.io)
Check on ticket-node-1:
Expected: both numbers are the same. If the second is lower, stop: don't apply the root app until the patches cover every PVC.
Adopt an existing app¶
-
Read the live destination namespace of the app, so the child manifest matches it:
<APP>is the Argo CD app name, for exampleeticket-cms-production. 2. Writeargocd/apps/<APP>.yamlwith that namespace, and push it toupdate_queue. 3. Apply the root app once (only the first time; after that, git is the source of truth):Expected:
application.argoproj.io/root-app-ticket created(orconfigured). 4. Check every app:Expected: every app shows
SyncedandHealthy. If one showsUnknown, see Fix DNS and sync faults.