- Developers work in feature branches and collaborate via pull requests.
- When changes are merged into the main branch, a CI pipeline builds and tests the application, produces artifacts (for example, container images), and pushes them to a registry.
- The CI process also updates the declarative configuration that represents the desired state (Kubernetes manifests, Helm charts, Kustomize overlays, or Jsonnet) in a Git repository.
- A GitOps operator (agent/controller) running inside the target cluster continuously watches the Git repository, pulls the updated manifests, computes the diff against the cluster’s actual state, and applies only the required changes to reconcile the cluster with Git.

| Characteristic | Why it matters | Example |
|---|---|---|
| Git as single source of truth | All desired state and change history lives in Git for traceability and audit | Store manifests or Helm charts in a repository; use git log for history |
| Declarative desired state | Enables automated reconciliation and drift detection | Use YAML manifests, Helm charts, or Jsonnet to describe resources |
| CI updates artifacts and manifests | CI builds images and updates the manifests repository with new image tags | CI pipeline writes image: myapp:sha-abc123 into manifests |
| Pull-based operator | Operator pulls changes from Git and applies only diffs to the cluster | Flux or Argo CD running in-cluster watches Git and reconciles |
| Continuous reconciliation | Detects and heals drift automatically | Operator periodically compares Git vs cluster and applies fixes |

git revert <commit>). The operator will detect the reverted desired state and reconcile the cluster back to the prior stable configuration. This makes every deployment auditable through standard Git history and enables simple, reliable rollbacks.
Useful links and references
- GitOps overview (Weaveworks): https://www.weave.works/technologies/gitops/
- Flux (GitOps operator): https://fluxcd.io/
- Argo CD (GitOps operator): https://argo-cd.readthedocs.io/en/stable/
- Kubernetes documentation: https://kubernetes.io/docs/
GitOps combines declarative infrastructure, Git-based versioning, and an automated pull-based operator to provide a provable, auditable, and self-healing delivery model. Git stores the canonical desired state and the operator continuously enforces it in the cluster.