Skip to content

Bootstrap ArgoCD for GitOps Deployment

ArgoCD is the primary declarative engine for the cluster. It continuously synchronizes Kubernetes resources against the master branch of this repository.

When running ./scripts/provision.sh, the Ansible role ansible/roles/argocd installs ArgoCD and applies the root application automatically.

If you ever need to manually deploy or recover ArgoCD:

Terminal window
kubectl apply --server-side --force-conflicts -k bootstrap/argocd
kubectl wait --for=condition=available --timeout=600s deployment/argocd-server -n argocd

Retrieve the initial admin password:

Terminal window
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d; echo

The repository uses two ApplicationSets in bootstrap/templates/:

flowchart TD
  Root["bootstrap/root.yaml"] --> Argo["ArgoCD Engine"]
  Argo --> InfraSet["infra ApplicationSet"]
  Argo --> AppsSet["apps ApplicationSet"]
  InfraSet --> InfraApps["infra-* apps (infrastructure/*)"]
  AppsSet --> UserApps["app-* apps (apps/*)"]
  • bootstrap/templates/infra-appset.yaml: Discovers every subdirectory in infrastructure/ and deploys its manifests or Helm charts into the cluster.
  • bootstrap/templates/apps-appset.yaml: Discovers workloads via apps/*/app.yaml and deploys applications into target namespaces with auto-prune and self-healing.

Step 3: Apply the root bootstrap application

Section titled “Step 3: Apply the root bootstrap application”

To trigger reconciliation of all infrastructure components and applications:

Terminal window
kubectl apply -f bootstrap/root.yaml

ArgoCD reconciles root.yaml, which creates the ApplicationSets, which in turn generate and synchronize all applications across the cluster.

Check that all applications report Synced and Healthy:

Terminal window
kubectl get applications -n argocd

To add a new workload or infrastructure component, push your manifests directly to Git; ArgoCD deploys them automatically.