Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Drift Detection · GitOps

Direct answer

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.

When to use this

Use this when the GitOps controller shows OutOfSync.

First 30 seconds

1. Drift: live state differs from git.

2. Self-heal reverts it.

3. Alert on OutOfSync.

4. Find who changed live resources.

5. Ignore expected diffs (HPA replicas) explicitly.

Operational verification

live change → drift detected → self-heal/alert

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
GitOps reconciliation
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.

PlatformGitOps reconciliation · 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 the GitOps controller shows OutOfSync.
What next?3 suggested next steps
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.

2 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 Verification path Verify boundary

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 scheduled/event-driven desired-versus-actual reads, normalized diff, ignored fields, freshness and creating a reviewable drift record before remediation.

Step 2 Common mistakes Narrow the fault
  • Drift alerts ignored.
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
Key points
  • OutOfSync means live differs from Git.
  • Find who changed the live resource.
  • Self-heal can revert automatically.
Key checks
  • argocd app list | grep OutOfSync — drifted apps
  • flux get kustomizations | grep -v True — not ready
  • selfHeal enabled — auto-correct
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Drift detection in GitOps identifies differences between what Git says and what is actually running. Drift happens through manual changes (kubectl edit), other controllers modifying resources, or failed syncs.

Typical states in Argo CD:

StatusMeaning
SyncedLive state matches Git
OutOfSyncDifferences exist
Healthy / DegradedWhether resources are working

Some fields change legitimately at runtime (replica counts set by an autoscaler, defaults added by the API server). Configure ignore rules for those, or the application shows permanent drift and real drift goes unnoticed.

spec:
  ignoreDifferences:
    - group: apps
      kind: Deployment
      jsonPointers: [/spec/replicas]
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 docGitOps reconciliation current

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

Basis: https://opengitops.dev/ · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For scheduled/event-driven desired-versus-actual reads, normalized diff, ignored fields, freshness and creating a reviewable drift record before remediation, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?