Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

GitOps

Direct 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.

When to use this

Use this when Git is the source of truth and an agent keeps the live system in sync.

First 30 seconds

1. GitOps: git is the source of truth; agents reconcile targets.

2. Pull-based deployment.

3. Changes via PRs.

4. Drift auto-corrected.

5. Rollback with git revert.

Operational verification

PR → merge → agent pulls → reconcile → target

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenGitOps principles / reconciliation controllers
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenGitOps principles / reconciliation controllers · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when Git is the source of truth and an agent keeps the live system in sync.
What next?3 suggested next steps
Child topics (this level)11
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Target-state verification ladder Verify boundary

GitOps uses a strict target-state ladder for Git desired state to reconciler effective state: request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified.

Step 2 Verification path Verify boundary

Verify GitOps across both source and target. Record the commit/revision intended for the environment, show the reconciler fetched and accepted that revision, inspect render/validation results, and correlate the controller object/status to the specific target resources it owns. After reconciliation, query target generation/version/health independently rather than assuming a “Ready” controller condition fully represents service health. Introduce a safe drift change to a managed property and verify whether the controller detects/reverts it according to policy; also test an invalid declaration to show it fails before harmful mutation. For promotion, verify the environment actually runs the intended artifact/config revision. The complete chain is Git revision → reconciler revision → applied target state → consumer/service verification.

Step 3 Where it fails Narrow the fault

The boundaries are Git/source availability and revision selection → rendering/generation → policy/schema validation → reconciler/controller → target API apply → target controller convergence → application/service health. A source commit existing does not show it was selected; a successful apply does not show workload health; and a healthy workload does not show the expected revision is running. Field ownership conflicts can create persistent drift even when both controllers are healthy. Do not “fix” reconciliation by editing managed target state unless intentionally suspending ownership. Preserve source revision and controller status before intervention. After remediation, re-run reconciliation and confirm both desired revision and independent service state.

Evidence references

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.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic 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.

Subtopic Git as Source of Truth

Git as source of truth means the repository is the only place configuration is changed.

Subtopic Declarative Configuration

Declarative configuration describes what the system should look like, such as Kubernetes manifests or Terraform files, rather than the steps to get there, which makes GitOps reconciliation possible.

Subtopic Desired State

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

Subtopic Reconciliation

Reconciliation is the controller's continuous loop of comparing desired state in Git with actual state and applying changes until they match.

Subtopic Pull-based Deployment

Pull-based deployment has an agent inside the target environment, such as Argo CD or Flux, pull changes from Git and apply them, so CI never needs credentials to the cluster.

Subtopic Drift Detection

Drift detection in GitOps is done by the controller comparing live resources with Git, showing OutOfSync status in Argo CD or Flux and optionally correcting it automatically.

Subtopic Change Review

Change review in GitOps means every change to infrastructure goes through a pull request with review and automated checks before merge, which then triggers deployment.

Subtopic Rollback

Rollback in GitOps is done by reverting the commit in Git, after which the controller reconciles the system back to the previous configuration, with full history of what changed.

Subtopic Environment Promotion

Environment promotion moves a change from dev to staging to production by updating each environment's configuration in Git, through pull requests or automated image updates.

Subtopic GitOps Troubleshooting

Troubleshoot GitOps by checking the controller's sync status and events, the rendered manifests, repository access, Helm or Kustomize errors, and resources changed outside Git.

Key points
  • Change Git, not the live system.
  • The controller reconciles continuously.
  • Rollback is a Git revert.
Key checks
  • argocd app list — Argo CD apps and sync status
  • flux get all -A — Flux resources
  • git log --oneline -5 -- <env path> — changes to environment
ReferenceWhy it matters1 section · depth on demand

In depth

GitOps is an operating model where the desired state of systems lives in Git and automated agents continuously reconcile live systems with it. Every change is a pull request, giving review, audit and rollback by revert.

ComponentExample
Git repositoryManifests, Helm charts, Kustomize, config data
ReconcilerArgo CD, Flux
TargetKubernetes clusters (also network/infrastructure)
PolicyBranch protection, required reviews

The agent pulls from Git, so clusters need no inbound access from CI and credentials stay inside the environment.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

GitOps applies a reconciliation control loop to declarative, versioned desired state. The OpenGitOps model emphasizes four properties: declarative intent, versioned/immutable storage, automatic pull by software agents, and continuous reconciliation of actual state toward desired state. The Git repository is therefore not the runtime controller; an agent/controller resolves a source revision, renders or interprets declarations, compares them with target state and applies changes according to its own ordering, health and retry semantics. Source revision, generated manifests and target observed state are separate artifacts. A merged commit may never reconcile because source access, rendering, policy or target authorization fails. Conversely, manual target changes may be reverted automatically because the controller continues to own the declared fields.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Define repository boundaries, protected branches, review policy, signing/attestation where required, reconciliation ownership and environment promotion strategy. Pin or version generators, charts/modules and controller configuration so the same source revision is reproducible. Secrets should use an explicit encrypted/external-secret model rather than plain repository storage. Decide how emergency/manual changes are handled: either they are rapidly represented back in Git, intentionally suspended, or recognized as drift that the controller will revert. Controller upgrades and CRD/schema changes require compatibility testing. Maintain a recovery path for lost controller state that can rebuild from versioned declarations without relying on undocumented in-cluster edits. Retain reconciliation history and source revision linkage for incident analysis.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docOpenGitOps principles / reconciliation controllers 1.0.0/current

Authoritative/upstream documentation reviewed for bounded claims in > GitOps. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://opengitops.dev/ · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Embedded reference data

Quick lookup tables

→ GitOps · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for → GitOps.

LayerGitOps operational reference
Runtime/ownershipOpenGitOps principles / reconciliation controllers · identify controller/worker/target ownership before mutation
Persistent intentVersioned configuration/playbook/workflow with explicit dependencies and least-privilege identity
Verificationgit rev-parse HEAD; inspect reconciler source revision/status; query target resource generation/status independently
Expected interpretationDesired 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 boundaryPreserve correlation IDs + pre-state, then verify target/service independently after remediation
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

GitOps output should preserve repository URL, commit/revision, reconciliation object/controller identity, rendered artifact or digest, target resource IDs, observed generation, health/condition state, last attempted/applied revision and error reason. Human-friendly “Synced/Ready” summaries are useful but should link to these structured fields. Distinguish source fetch errors, render/schema errors, policy rejection, apply conflicts, health timeout and target-service failure. When controllers retry continuously, retain first-failure time and attempt metadata so a flapping system is not mistaken for a single event. Diff output must show which fields are controller-owned versus ignored/external. Avoid logging decrypted secrets while preserving enough object identity to show what changed.

Confirmation

Confirm action

Continue?