Small Kubernetes changes with GitOps: Helm and Argo CD
In Making changes you can take back: safe releases for infrastructure, the habits were small batches, a known undo path, staged rollout and a record of what changed. Those habits still apply on Kubernetes. The difference is the path a change takes: a pull request, a rendered desired state, and a controller that reconciles the cluster toward that state.
GitOps with Helm and Argo CD is one common way to make that path the default. It does not remove the hard cases — schema changes, shared cluster resources, deletes — but it makes the ordinary change reviewable, reversible and searchable.
1. The path: Git, Helm, Argo CD
Three steps:
- Someone changes Git. Image tag, values, template or Application spec. Review happens on the diff, not on a live
kubectl apply. - Helm turns the chart into Kubernetes manifests. Charts and values describe the desired objects. Keep chart versions, dependencies and values pinned in Git, and avoid random or time-dependent templates so that rendering is repeatable.
- Argo CD reconciles. It compares desired manifests with live objects and syncs until they match, subject to the Application’s sync policy.
CI builds and pushes an image. Git records which image and config should run. Argo CD makes the cluster match Git.
2. Helm renders; Argo CD owns the lifecycle
Argo CD uses Helm to inflate charts with helm template. It does not run Helm’s install/upgrade/rollback lifecycle. There is no Helm release history to helm rollback. History and undo live in Git and in Argo CD’s Application state.
Consequences: many Helm hooks map onto Argo CD sync hooks, and every operation is a sync, not a distinct install versus upgrade; charts that regenerate random values (for example randAlphaNum) look permanently OutOfSync unless pinned; “roll back” means syncing a previous known-good desired state from Git or Argo CD history. Helm renders; Argo CD applies.
3. Make the desired state honest
GitOps only helps if the desired state is specific and bounded.
Pin what you ship. Prefer an image digest, or a tag that never moves once published. A floating latest means Git can look unchanged while the cluster pulls something new.
Keep one concern per change. A pull request that bumps one service image is reviewable. One that also retunes HPA, rewrites Ingress and deletes a CronJob is not. When something breaks, the suspect list should be short.
Scope the Application. An Application scoped to a service or another clear operational boundary is easier to reason about than one that owns half the cluster. Shared or cluster-scoped objects — ClusterRoles, PriorityClasses, CustomResourceDefinitions and Namespaces — can affect other Applications. Sync options that fail on shared resources, or require confirmation before prune/delete on critical kinds, exist because a mistaken prune can be wide.
Render before merge when the diff is hard. Templates hide the real objects. A CI helm template (or Argo CD’s generated manifests) turns “values look fine” into “these Deployments will change”. Watch deletes and replaces.
4. Sync policy is a set of tradeoffs
Argo CD can sync by hand or automatically. Automated sync is convenient: the pipeline writes Git, and the cluster follows. The knobs matter.
- Automated sync runs when the Application is OutOfSync. By default it does not prune objects missing from Git, and it does not self-heal live drift.
- Prune deletes cluster objects no longer in the desired state. Useful for real removals; dangerous for accidental ones, shared objects, and anything with data. Leaving prune off for automation, and pruning in a reviewed manual sync, is a common safety choice. Per-resource
Prune=falseor prune confirmation helps when a kind must not vanish quietly. - Self-heal reverts live edits toward Git. That closes the “fixed with kubectl, never told Git” hole. It also fights an emergency hotfix applied only to the cluster, unless Git is updated or automation is paused first.
- Rollback with automated sync. Argo CD will not roll back an Application that still has automated sync enabled. Disable it before rolling back through Argo CD history, or create a Git revert commit that restores the previous desired state and sync that new commit — and know which path you are on before the pager goes off.
These flags are not “more GitOps”. They control how fast the cluster moves and how hard it is to intervene by hand.
5. Healthy is not “correct for users”
Argo CD health for Deployments checks things like observed generation and updated replica counts. That is necessary. It is not sufficient.
A Deployment can be Healthy while the new binary serves errors, latency doubles, or a default flips the wrong way. Treat Argo CD status as “objects accepted and controllers report progress”, then watch user-facing signals: error rate, latency percentiles, saturation, and abort criteria written beforehand. Progressive delivery can sit beside Argo CD; the canary rule is unchanged.
6. Git revert is not always recovery
Reverting the commit that raised a replica count or rolled an image usually restores the previous desired state. Sync applies it. That is the happy path.
It fails when the change was not a pure config flip:
- Schema or data migrations. Dropping a column or rewriting rows does not come back when Git goes back. Expand-then-contract still applies.
- Deletes. Removing a resource plus prune removes it from the cluster. Restoring the manifest can recreate the resource, but it does not guarantee recovery of its data. For persistent storage, recovery depends on retention settings, reclaim policies and backups.
- Forward fix. Sometimes the safe move is a new commit that disables the bad behaviour, not a revert that reintroduces incompatible older config.
- Partial apply. A sync can leave some objects updated and others not. Know whether undo means the previous Git revision for the whole Application or a targeted forward change.
Before merging a delete or migration, write the undo path in the pull request. If undo is “restore from backup” or “run a forward migration”, say so.
7. Drift and emergency edits
Live edits happen in incidents. Self-heal fights them; without it, the Application stays OutOfSync until someone reconciles.
Pause automated sync / self-heal if you must change the cluster first; make the smallest live fix; once users are stable, commit that exact fix to Git and sync; re-enable automation only then. A permanent kubectl snowflake means the next sync or prune will surprise someone.
8. A short checklist
## Change
- What is changing (image, values, template, Application):
- Application(s) and namespaces affected:
- Link to PR and rendered manifest diff:
## Before merge
- [ ] Diff reviewed; one concern where possible
- [ ] Image reference is immutable (digest or locked tag)
- [ ] Shared / cluster-scoped resources called out
- [ ] Deletes and prunes identified; data impact checked
- [ ] Undo path written (Git revert, forward fix, or restore)
## Sync
- Auto-sync / prune / self-heal settings for this Application:
- How to pause automation if we need a live hotfix:
- Health signals in Argo CD plus user-facing abort criteria:
## After
- [ ] Sync finished; intended objects match Git
- [ ] Error rate, latency, saturation acceptable
- [ ] Any emergency cluster edit committed back to Git
9. Summary
GitOps with Helm and Argo CD puts Kubernetes changes on a path that is naturally small, reviewable and recorded: change Git, render desired state, reconcile. Remember that Argo CD renders with Helm and owns the apply lifecycle; that Healthy is not the same as good for users; that prune and self-heal are sharp tools; and that Git revert does not undo schema, data or a deleted volume. Used that way, the controller enforces the habits from safe releases instead of replacing them.
References
- Argo CD documentation, Helm.
- Argo CD documentation, Automated Sync Policy.
- Argo CD documentation, Sync Options.
- Argo CD documentation, Resource Health.
- Earlier note: Making changes you can take back: safe releases for infrastructure.