on
GitOps made simple: Deploying apps with Argo CD
GitOps promises to make deployments predictable: your Git repo is the single source of truth, and the cluster’s desired state follows automatically. Argo CD is one of the most popular tools that makes that promise real — and in the last couple of years it’s added a few practical building blocks that make everyday workflows (like preview environments, automated image updates, and safe rollouts) feel almost effortless. This article walks through those pieces and shows a compact, approachable pattern you can use today.
The three building blocks that matter
Think of deploying an app like putting on a concert: you need the stage (clusters), the set list (manifests in Git), and a stage manager who cues the band and the lights. In Argo’s world:
-
ApplicationSet: the stage manager that can generate many Argo CD Applications from patterns — useful for one-app-per-PR preview environments or per-cluster deployments. The controller has Git, cluster, and PR generators that remove manual copy-paste. (github.com)
-
Argo CD Image Updater: watches registries (or tags) and can update the Git manifests the same way a developer would — by committing a version bump to the repo that Argo CD then applies. That closes the loop between CI/registry events and the GitOps flow. (app.readthedocs.org)
-
Argo Rollouts: a progressive-delivery controller that integrates with Argo CD and lets you do canaries and automated rollbacks based on metrics — useful when you want gradual, observable releases instead of “big-bang” updates. (argoproj.github.io)
These three components combine into a workflow that balances automation with auditability: every change is a commit in Git, preview environments can spin up per PR, image updates can be automated or reviewed, and rollouts can be gated by real metrics.
A simple, real-world workflow
Imagine a team using GitHub: a developer opens a PR, CI builds an image and pushes it to a registry, and you want a preview environment (a per-PR URL) and a safe way to promote to staging/production.
-
ApplicationSet’s Git or PullRequest generator watches the repo and creates an Argo CD Application per PR or branch. Each generated Application points to a per-PR Kustomize overlay or Helm values that scope resources into a namespaced preview. This pattern is a common way to deliver ephemeral preview environments. (signadot.com)
- The Image Updater can either:
- Automatically update the PR’s manifest commit with the built image tag (fully automated), or
- Create a suggested commit that a reviewer merges (human-in-the-loop). Either way, the change is visible in Git and Argo CD applies it. (app.readthedocs.org)
- For production promotion, use Argo Rollouts so releases can be cut gradually and observed; if a metric goes bad, the rollout can automatically pause or rollback. That gives confidence when you flip traffic from blue to green or roll out a canary. (argoproj.github.io)
Argo CD’s web UI and ApplicationSet preview features are also improving: the UI can show what Applications an ApplicationSet will generate, making the “what happens if I merge” question easier to answer before you actually create resources. (blog.argoproj.io)
Small YAML examples (safe, readable)
ApplicationSet (PR-generator style — simplified):
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: previews
spec:
generators:
- pullRequest:
repoURL: https://github.com/your-org/your-app
scmType: github
filters:
labels:
- preview
template:
metadata:
name: '-preview'
spec:
project: default
source:
repoURL: https://github.com/your-org/your-app
path: overlays/preview
destination:
server: 'https://kubernetes.default.svc'
namespace: preview-
syncPolicy:
automated: {}
Argo CD Image Updater (minimal ImageUpdater CR example):
apiVersion: argoproj.io/v1alpha1
kind: ImageUpdater
metadata:
name: my-app-updater
spec:
image: ghcr.io/your-org/your-app
updateStrategy:
semver: true
target:
repo: https://github.com/your-org/your-app-manifests
path: overlays/preview
field: image.tag
These snippets show the idea — generators produce apps, and an updater writes the new tag back to the manifests so Argo CD can sync.
What can go wrong (and how teams handle it)
Preview environments are delightful, but they can create resource sprawl: stale previews consume quotas and cost money. Common mitigations:
- Automated cleanup: delete Application and namespace when PR closes.
- Quotas and cluster limits: enforce CPU/memory limits on preview namespaces.
- RBAC and approval gates: restrict who can create cluster-scoped resources via Argo CD projects and RBAC.
- Observability for rollouts: ensure metrics and alerting are wired into your rollout strategy — a canary’s value is only as good as the metrics it watches.
Community write-ups and operator docs highlight these tradeoffs and patterns for organizing repos and ApplicationSets at scale. They show how teams pick between “one repo, directories per environment” vs “branches per environment” and why ApplicationSet + generators can reduce boilerplate. (mguarinos.com)
A balanced note
GitOps with Argo CD is powerful precisely because it ties changes to Git commits — that gives auditability and reversibility. But it’s not a magic wand: preview environments, automated image updates, and progressive rollouts each add operational surface area (cleanup, permissions, observability). Treat them like tools in a musician’s kit: used thoughtfully, they let the band play tight; used without practice, the song can get noisy.
If you want a compact, low-friction pattern, start by using ApplicationSets for previews, add Image Updater for registry-driven commits when you’re comfortable, and gate public-facing releases with Argo Rollouts. The UX improvements to ApplicationSet previews in the Argo CD UI and the maturing Image Updater project make this pattern easier to manage today than it was a couple of years ago. (blog.argoproj.io)
References (selected)
- Argo CD ApplicationSet docs (generators and templates). (github.com)
- How preview/ephemeral environments using ApplicationSet commonly work. (signadot.com)
- Argo CD Image Updater — project docs and behavior. (app.readthedocs.org)
- Argo Rollouts FAQ and behavior for progressive delivery. (argoproj.github.io)
- Argo CD ApplicationSet UI and preview feature discussion. (blog.argoproj.io)
Deployments should feel like a practiced set list: predictable, rehearsed, and enjoyable to run. Argo CD, with ApplicationSet, Image Updater, and Rollouts, gives you the tools to make that happen — as long as you keep the basics in tune: cleanup, permissions, and observability.