Git, CI/CD & GitOpsLXXXVII · GitOps During IncidentsReconciliation
Post-incident Git reconciliation — the manual change must enter Git
What you'll learn
- Commit the emergency edit to Git as part of the post-incident repair, with a message linking to the incident ID
- Validate that the cluster and Git agree after the commit and before resuming self-heal
- Distinguish the reconciliation commit from a regular feature commit by its message and review path
- Recognise the cost of leaving an emergency edit uncommitted - silent drift, audit gap, replay on next sync
Prerequisites
Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x
The reconciliation commit is the Git-side closure of the break-glass procedure from LXXXVII-02 and LXXXVII-03. The emergency edit was applied to the cluster; the corresponding manifest in Git still says the old value. The next time self-heal is resumed, the controller will revert the edit; the next time an unrelated change is committed, the controller will produce a confusing diff. The reconciliation commit makes Git say what the cluster says, so the controller’s view of desired state matches the operator’s view of observed state.
The discipline is to commit the change before resuming self-heal. A commit-and-resume order produces a clean convergence; a resume-before-commit order produces a reversion loop that the responder must interrupt again.
flowchart LR
A["Emergency edit applied to cluster"] --> B["Diff cluster vs Git"]
B --> C["Update manifest in Git"]
C --> D["Commit with incident ID in message"]
D --> E["Resume self-heal"]
E --> F["Validate convergence"]
F --> G["Cluster == Git"]
What the reconciliation commit contains
The reconciliation commit is a regular commit on the regular branch. It is not a special branch; it is not a hotfix tag; it is the same Git history the team would produce for any other change. The contents are the manifest file(s) whose cluster state changed during the incident, with the values that the cluster now has.
The commit message is the one element that distinguishes the reconciliation commit from a regular commit:
fix(manifests): align api deployment with incident INC-1234
The api Deployment was running with image tag v3.2.7 during the
INC-1234 incident from 02:14 to 02:45 UTC. The manifest in Git
referenced v3.2.6, which produced a reversion loop while
self-heal was on. Update the manifest to v3.2.7 to align with
the cluster state and close the break-glass procedure.
Refs: INC-1234
The Refs: trailer links the commit to the incident record.
The link is what the next on-call engineer searches; the link
is what the auditor reads; the link is what the post-incident
review cites. A reconciliation commit without an incident
reference is indistinguishable from a regular commit and is
the signal that the responder did not follow the procedure.
Validating convergence
After the commit lands and self-heal is resumed, the responder validates convergence. The validation has three steps:
- Diff is empty.
argocd app diff $APP_NAME(Argo CD) orflux diff kustomization $KS_NAME(Flux) shows no changes between the cluster and the rendered manifests. - Sync status is Synced.
argocd app get $APP_NAMEreportsSync Status: SyncedandHealth Status: Healthy. - Self-heal is on.
argocd app get $APP_NAMEreports the sync policy and self-heal flag have been restored to their pre-incident values.
A validation that finds lingering drift is the signal that the reconciliation is incomplete. The responder either commits the remaining diff (if it represents an undeclared change) or reverts the cluster (if the commit was wrong).
flowchart LR
A["Commit landed"] --> B["Resume self-heal"]
B --> C["Wait one reconciliation tick"]
C --> D{"Diff empty?"}
D -- yes --> E["Synced + Healthy"]
D -- no --> F["Reconcile remaining diff"]
F --> C
The cost of leaving the edit uncommitted
The cost of skipping the reconciliation commit is paid in three ways:
- Silent drift. The cluster has a value that Git does not.
The Application is
OutOfSync. The drift alert fires. The next on-call engineer pages the team for a non-incident drift that the team has already paid to create. - Audit gap. The incident record has a Kubernetes audit log entry for the edit; the GitOps audit trail has no commit hash. Six months later, the security team cannot answer “which commit introduced this value” - the answer is “no commit, a manual edit during an incident that was never reconciled”.
- Replay on next sync. A future operator runs
argocd app sync $APP_NAMEor the controller auto-syncs on a new commit. The next sync reverts the cluster to Git’s view, the emergency edit is lost, and the next incident has the same trigger.
The three costs compound. A team that skips the reconciliation commit once pays the silent-drift cost; pays it again on the next sync; pays it a third time when the audit gap is discovered. The discipline is to commit before resume.
Production discipline
- Commit before resume. The order is the difference between a clean repair and a reversion loop.
- Reference the incident ID in the commit message. The
Refs:trailer is the audit trail. - Validate convergence with three reads. Diff, sync status, self-heal flag.
- Treat lingering drift as an incomplete reconciliation. The repair is not done until diff is empty.
Cross-course references
- This course, Part LXXV-04 (Emergency drift) - the drift category the reconciliation closes.
- This course, Part LXXXV-06 (Post-rollback investigation)
- the audit-trail discipline that includes the reconciliation commit hash.
- Conventional Commits - the message format that makes reconciliation commits greppable in the history.
Quiz
Knowledge check · 4 questions
Q1. An emergency edit was applied during an incident; self-heal is currently suspended on the affected Application. What is the correct order to close the break-glass procedure?
Q2. A reconciliation commit is a special Git branch that holds emergency edits separately from the regular history.
Q3. Name the three validation reads that confirm the reconciliation is complete after the commit lands and self-heal is resumed.
Q4. Walk through the reconciliation sequence and identify the missing commit.
An incident is resolved at 02:45. The on-call engineer resumes self-heal at 02:46 without committing. At 03:00 the engineer goes off-call without writing a commit. At 09:00 the morning's automated sync fires; the controller sees the cluster drift from Git, reverts the cluster to Git's view, and the application is broken again. The next on-call engineer pages the team for 'the same incident from this morning'.
Passing score: 75%. Answers are checked in this browser.