Menu

Per-PR Preview Environments with FluxCD
🖼️

Per-PR Preview Environments with FluxCD

DEV Community: kubernetes·Artur Havrylov·5 months ago
#kTMpXC2s
Reading 0:00
15s threshold

You want a preview environment for every pull request - open a PR, get a working URL. On Kubernetes with Flux, there's no built-in way to get one: Kustomization and HelmRelease don't template themselves per PR.

The usual workarounds each have a catch:

a kubectl apply CI job - breaks GitOps, since the cluster drifts from git

Argo CD ApplicationSet - now you're running two GitOps controllers

a custom controller that watches your PRs - works, but it's yours to maintain

There's a lighter option: the Flux Operator's ResourceSet and ResourceSetInputProvider CRDs . Two YAML files per service, no custom code, no second control plane.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.