ArgoCD GitOps Engine
Overview
ArgoCD automates deployment and configuration synchronization for all applications in the cluster using declarative GitOps.
Directory-Based ApplicationSet
The cluster uses an ApplicationSet generator defined in apps/applicationset.yaml. It monitors the Git directory apps/src/*:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: apps-from-dir
namespace: argocd
spec:
generators:
- git:
repoURL: [email protected]:AbdouBouallaga/personal_server.git
revision: main
directories:
- path: apps/src/*
Whenever you commit a new folder inside apps/src/ (such as apps/src/portal/), ArgoCD automatically:
- Detects the new directory.
- Creates an ArgoCD application named after the folder (
portal). - Creates the target namespace if it doesn’t exist.
- Continuously self-heals and synchronizes all Kubernetes YAML manifests.
CLI Commands & Troubleshooting
# View all synchronized applications
kubectl get applications -n argocd
# Force immediate refresh & sync of an application
kubectl patch application <APP_NAME> -n argocd --type merge -p '{"operation":{"sync":{"prune":true}}}'