- 1. Intro
- 2. CD Workflow without ArgoCD
- 3. CD Workflow with ArgoCD
- 4. Git as Single Source of Truth
- 5. References
1. Intro
ArgoCD is a Continuous Delivery Tool. ArgoCD supports k8s yaml files, helm charts and kustomize.
2. CD Workflow without ArgoCD
CI: Code commit -> Build,Test -> Build and Push Docker images to Registry -> ...
CD: ... -> Update k8s manifest -> kubectl apply...
Challenges of above approach:
- Install and setup tools like
kubectl
- Configure access to K8s cluster
- Configure access to Cloud Platform
- Security challenge
- No visibility of deployment status
3. CD Workflow with ArgoCD
- Deploy ArgoCD in k8s cluster
- Configure ArgoCD to track Git repository
- ArgoCD monitors for any changes and applies automatically
CI: Code commit -> Build,Test -> Build and Push Docker images to Registry -> Update k8s manifest (in separate repo)...
CD: ... -> Track and Sync changes by ArgoCD (application cofngiguration repo)...
Note: Best Practice for Git repository is to separate application source code, application configuration (also called GitOps repository) and system configuration.
4. Git as Single Source of Truth
- K8s configuration defined as Code in Git repository
- Desired State is defined in Git repository (i.e. manual change of cluster will be reverted,synced with desried state in git)
- Git repository is a single interface of version controlled changes
Info: It is also possible to configure ArgoCD to not sync manual cluster changes automatically but send alert instead.