Pcornel
Automation · GitOps

Desired State

Cheat sheet · https://pcornel.dk/topic.php?topic=5485

Back to the Topic

Answer

Desired state in GitOps is the configuration committed to the Git repository; the GitOps controller continuously works to make the live system match it.

Remember

  • The Git commit is the desired state.
  • The controller converges the cluster to it.
  • Changes start in Git.

First checks

  • argocd app diff <app> — desired vs live
  • flux diff kustomization <name> --path <path> — Flux diff
  • Desired state per environment directory — structure

Verify in this order

git → desired manifests → compare live

Where it usually breaks

Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.

GitOps → Desired State · operational reference

LayerGitOps → Desired State operational reference
Context identityOpenGitOps Principles 1.0/current + exact revision/input/target identity
Persistent intentVersioned contract/configuration with explicit ownership and prerequisites
VerificationValidate inputs/read current state → exercise bounded operation → independent target read-back
Output contractPreserve structured status/IDs/properties before human formatting
Failure boundarySeparate source/input/engine/controller execution from downstream target outcome

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5485

Confirmation

Confirm action

Continue?