Use this to understand GitOps principles.
GitOps Fundamentals
GitOps fundamentals: declarative configuration stored in Git, changes through pull requests, automated pull-based deployment by an agent, and continuous reconciliation of the live state.
1. Principles: declarative, versioned, pulled automatically, continuously reconciled (OpenGitOps).
2. Separate app code and config repos if useful.
3. Secrets via sealed/external secrets.
4. Observability of sync.
5. Access control on repos.
declarative config in git → agent → cluster/infra
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Record repository, commit/ref, controller, environment/cluster and target resource IDs; inspect the runtime/control-plane result; then query the reconciled infrastructure/application state represented by the Git revision through an independent read path and compare it with the versioned intent. The negative fixture should deliberately exercise risks such as wrong branch/environment, generated manifest drift, controller lag, manual changes, secret/reference failures, prune/delete surprises and green sync status without healthy workload, choosing the cases most relevant to declarative, versioned/immutable, pulled automatically and continuously reconciled principles plus the boundary between Git intent and actual runtime health. For GitOps → GitOps Fundamentals, the evidence must connect the control-plane result to the reconciled infrastructure/application state represented by the Git revision and explain any gap between desired, controller-reported and consumer-visible state.
Step 2 Common mistakes Narrow the fault
- Manual changes in the target environment.
Step 3 Where it fails Narrow the fault
Common failure classes include wrong branch/environment, generated manifest drift, controller lag, manual changes, secret/reference failures, prune/delete surprises and green sync status without healthy workload. Before retrying a mutating operation, read current target state using the stable identity repository, commit/ref, controller, environment/cluster and target resource IDs; if state is unknown, stop broad retries.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- GitOps = declarative config + Git + pull-based agent + reconciliation.
- Git is the source of truth.
- Agents apply changes, not CI.
argocd app get <app>— statusflux get kustomizations -A— Flux status- Repo structure (apps, envs) — organisation
ReferenceWhy it matters1 section · depth on demand
In depth
GitOps fundamentals rest on four principles from OpenGitOps: desired state is declarative, versioned and immutable, pulled automatically, and continuously reconciled. Together they make Git history the record of what should be running.
| Principle | In practice |
|---|---|
| Declarative | YAML manifests, not scripts |
| Versioned and immutable | Git commits and tags |
| Pulled automatically | Agent watches the repository |
| Continuously reconciled | Drift is corrected or reported |
Promotion between environments is typically a pull request that changes an image tag or overlay in the next environment's directory.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
GitOps → GitOps Fundamentals is owned at runtime by the Git-backed reconciliation controller continuously comparing declared and actual state. Its durable intent is versioned declarative state in Git plus reconciliation scope, credentials and policy; the stable identity contract is repository, commit/ref, controller, environment/cluster and target resource IDs. The consumer-visible target is the reconciled infrastructure/application state represented by the Git revision. The operating invariants are that Git is the reviewed source of desired state, reconciliation scope is bounded, drift is observable, controller identity/version is known and actual state is read independently. Follow the chain of components Git commit/ref → controller fetch/render → diff → reconcile/apply → target system → health/drift/read-back and record which layer currently owns truth. The linked authority for bounded mechanics is OpenGitOps — GitOps Principles; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in GitOps > GitOps Fundamentals. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://opengitops.dev/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture at minimum repo/ref/SHA, controller/reconcile ID, target resource IDs, diff, sync/health status, errors, observed revision and actual-state read-back. For declarative, versioned/immutable, pulled automatically and continuously reconciled principles plus the boundary between Git intent and actual runtime health, prefer typed fields and stable IDs over human presentation text.