Automation
GitOps
Cheat sheet · https://pcornel.dk/topic.php?topic=5481
Answer
GitOps uses a Git repository as the source of truth for declarative infrastructure and application configuration, with an agent like Argo CD or Flux continuously reconciling the live system to match it.
Remember
- Change Git, not the live system.
- The controller reconciles continuously.
- Rollback is a Git revert.
First checks
argocd app list— Argo CD apps and sync statusflux get all -A— Flux resourcesgit log --oneline -5 -- <env path>— changes to environment
Verify in this order
PR → merge → agent pulls → reconcile → target
Where it usually breaks
Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.
→ GitOps · operational reference
| Layer | GitOps operational reference |
|---|---|
| Runtime/ownership | OpenGitOps principles / reconciliation controllers · identify controller/worker/target ownership before mutation |
| Persistent intent | Versioned configuration/playbook/workflow with explicit dependencies and least-privilege identity |
| Verification | git rev-parse HEAD; inspect reconciler source revision/status; query target resource generation/status independently |
| Expected interpretation | Desired state is declarative, versioned/immutable, pulled automatically and continuously reconciled; the reconciler revision and target observed state agree or expose a clear drift/error. |
| Recovery boundary | Preserve correlation IDs + pre-state, then verify target/service independently after remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5481