Use this when Git is the only place configuration changes.
Git as Source of Truth
Git as source of truth means the repository is the only place configuration is changed. Manual changes to the live system are drift, reverted by reconciliation.
1. Git is the only way to change targets.
2. Protected branches and reviews.
3. Restrict direct access (kubectl edit).
4. Audit via git history.
5. Automate promotion.
change → PR → merge → applied
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
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 commit identity, review/merge controls, branch/environment mapping, generated artifacts and proving the reconciler is consuming the intended revision.
Step 2 Common mistakes Narrow the fault
- Manual changes in the cluster/devices that the agent reverts.
- Secrets committed in plain text (use SOPS/Sealed Secrets).
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.
- Git is the only place changes are made.
- Manual changes count as drift.
- Git history is the audit trail.
git log --oneline -- <path>— changes- Branch protection and reviews — control
- No direct cluster changes (RBAC) — enforcement
ReferenceWhy it matters1 section · depth on demand
What it is
In GitOps, Git holds the desired state; changes happen by merge request, and an agent applies what is in Git. The repository history becomes the change log.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
In GitOps, Git is the single source of truth for the desired state of the system. Every change — application version, configuration, infrastructure — is a commit, reviewed through a pull request, and an automated agent makes the running system match what is in Git.
What this gives you:
| Benefit | Because |
|---|---|
| Audit trail | Every change is a commit with author and review |
| Rollback | git revert restores a previous state |
| Reproducibility | The repository can rebuild the environment |
| Access control | People change Git, not production directly |
The discipline required: no manual changes in the running system, because the agent will either revert them or report drift. Secrets need special handling (Sealed Secrets, SOPS, External Secrets) since they cannot be stored in Git in clear text.
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 > Git as Source of Truth. 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
For commit identity, review/merge controls, branch/environment mapping, generated artifacts and proving the reconciler is consuming the intended revision, prefer typed fields and stable IDs over human presentation text.