This repo is in the middle of transition from Argo to Flux at the moment. I will rewrite this README eventually to reflect recent changes.
Follow these steps to install ArgoCD and bootstrap the infrastructure:
kubectl create ns argocd
helm upgrade --install argocd argo/argo-cd -n argocd --version=7.8.26 -f ./applications-helm/argocd/argocd/values.yaml
kubectl apply -f main-application.yaml -n argocd
kubectl get secrets argocd-initial-admin-secret -n argocd -o yaml
to get the base64-encoded admin ArgoCD UI passwordkubectl port-forward svc/argocd-server -n argocd 8443:80
to forward the ArgoCD port, open http://127.0.0.1:8443 locally and login there then, ignore certificate errors ("thisisunsafe" trick in Chrome browser: when you see the certificate error page, type "thisisunsafe" to proceed)- Open Settings -> Repositories in the ArgoCD UI and connect your git repo manually (you typically need to provide just "Repository URL" and "SSH private key data")
- You won't be able to add all applications at once because monitoring CRDs are not installed separately. Turn off monitoring for ArgoCD, Rook operator, Rook Ceph cluster, and Nginx ingress controller until you populate the "monitoring" namespace with the Prometheus stack and its CRDs
This repository contains Kubernetes infrastructure configurations managed by ArgoCD. The structure follows GitOps principles where changes to this repository automatically synchronize with the target cluster.
- Defined in
applicationsets/main-application.yaml
- Orchestrates all other applications through ApplicationSets
-
Helm-based Applications
- Generated by
applicationsets/helm-applicationset.yaml
- Processes applications in
applications-helm/
directory - Each application is deployed using Helmfile
- Generated by
-
Raw Manifest Applications
- Generated by
applicationsets/non-helm-applicationset.yaml
- Processes applications in
applications-raw/
directory - Applications contain direct Kubernetes manifests
- Generated by
- Each top-level folder represents a Kubernetes namespace
- Example:
applications-helm/argocd/
- Example:
- Each namespace folder contains subfolders representing ArgoCD applications
- Example:
applications-helm/argocd/argocd/
contains:helmfile.yaml
- Helmfile configurationvalues.yaml
- Helm values
- Example:
- Each top-level folder represents a Kubernetes namespace
- Example:
applications-raw/argocd/
- Example:
- Each namespace folder contains subfolders representing ArgoCD applications
- Example:
applications-raw/argocd/argocd-secrets/
contains raw Kubernetes manifest YAML files
- Example:
-
Application Name Uniqueness: Each ArgoCD application name (the 2nd level subfolders under
applications-helm
andapplications-raw
) must be globally unique across the entire cluster. Duplicate application names will cause conflicts in ArgoCD and prevent proper synchronization.Practical Example:
- ❌ Invalid structure (duplicate application names):
applications-raw/ ├── application/ │ └── network-policies/ # Application name: network-policies │ └── policy1.yaml └── pg-application/ └── network-policies/ # Application name: network-policies (DUPLICATE!) └── policy2.yaml
- ✅ Valid structure (unique application names):
applications-raw/ ├── application/ │ └── network-policies-application/ # Application name: network-policies-application │ └── policy1.yaml └── pg-application/ └── network-policies-pg-application/ # Application name: network-policies-pg-application └── policy2.yaml
- ❌ Invalid structure (duplicate application names):
- ArgoCD monitors this repository
main-application.yaml
triggers the two ApplicationSets- ApplicationSets scan their respective directories:
applications-helm/
→ Helmfile-based appsapplications-raw/
→ Raw manifest apps
- Applications are deployed to their respective namespaces in the target cluster