[ SRE_ARENA ]
GITOPS

GitOps: Git is the Operator. You are the Observer.

Visualization: 1. Push vs Pull (The Paradigm Shift)
DOWNLOADING CONCEPT: 1. PUSH VS PULL (THE PARADIGM SHIFT)...
Push (The Old Way)
  • ↳The CI server (like Jenkins) builds the image and then runs kubectl apply.
  • ↳This means Jenkins must have highly privileged cluster-admin credentials.
  • ↳If Jenkins gets hacked, your production cluster gets hacked.
Pull (GitOps)
  • ↳The CI server builds the image and simply updates a text file in a Git repo.
  • ↳That's it.
  • ↳An agent running *inside* the Kubernetes cluster (ArgoCD or Flux) constantly watches that Git repo.
  • ↳When Git changes, ArgoCD pulls the YAML and applies it.
  • ↳The CI server has zero access to Kubernetes, vastly improving security.
▲ LIVE INCIDENTArgoCD is caught in an endless loop, syncing the exact same Deployment every 5 seconds. It says the cluster is 'Out of Sync', applies it, says 'Synced', and 5 seconds later it's 'Out of Sync' again.
sre@arena:~/gitops
sre@arena:~$ argocd app diff my-app