Chapter 96: Flux GitOps — Sources, Reconciliation and Safe Local Practice
96.1 GitOps and push CI are different responsibilities
Fictional teaching story. At a fictional Pune bakery, Asha and Leo notice that a successful build does not tell them whether last night’s manual cluster edit still exists.
Why
A build pipeline finishing is not continuous proof that a running system matches reviewed configuration.
What
Separate producing an artifact from reconciling configuration.
How
Push deployment versus reconciliation
A push deployment sends a change to a target as a pipeline step. Reconciliation repeatedly compares a desired description with what the controller observes and tries to reduce the difference.
Immediate practice example
- Read the example from top to bottom. Do not send it to a real cluster.
Push: build -> test -> deployment request -> pipeline ends
Reconcile: read desired -> observe -> compare -> act -> repeat
- Read the expected result.
Illustrative output: not executed by Flux, kubectl, Helm or Kubernetes.
A later manual edit can be noticed by a continuing reconciler.
- Understand each line in plain English.
The first line describes a one-time pipeline route, not every possible CI design. The second line describes the feedback loop. Reconciliation can fail because of permissions, invalid configuration or unavailable services; it is not a promise that every application is healthy.
GitOps does not remove CI
Continuous integration (CI) builds and tests changes. GitOps uses versioned, reviewable desired state and automated reconciliation. The two can cooperate.
Immediate practice example
- Read the example from top to bottom. Do not send it to a real cluster.
CI produces image demo-app:demo-2
Review changes a manifest reference to demo-2
A controller observes the reviewed revision
- Read the expected result.
Illustrative output: not executed by Flux, kubectl, Helm or Kubernetes.
The artifact producer and the configuration reconciler have different jobs.
- Understand each line in plain English.
The first line produces an illustrative application artifact. The second line changes a desired reference after review. The third line reads that reference. No image was built and no commit was pushed here. Git review alone does not prove that an image is trustworthy.
Ravindra Bagale's Tip
A green pipeline and a healthy reconciled application are different facts.
Pipeline green आहे आणि application healthy आहे या वेगळ्या गोष्टी आहेत.
Pipeline green होना और application healthy होना अलग बातें हैं.
Did you understand? Let us try it once more.