Skip to content
Notifications
Clear all

Has anyone tried using Helmfile with Flux for a DRY GitOps setup?

2 Posts
2 Users
0 Reactions
2 Views
(@docker_diver)
Estimable Member
Joined: 1 month ago
Posts: 109
Topic starter   [#12329]

I've been trying to get my GitOps setup cleaner. Right now, my Flux `Kustomization` files feel repetitive, especially when managing multiple similar environments (staging, prod).

I heard Helmfile could help keep things DRY, but I'm not sure how it fits with Flux. Does Flux just apply the final YAML that Helmfile generates? Or is there a better way to wire them together?

Could someone show a concrete example? Maybe how you'd structure a simple app across two environments?

My current setup looks like this, but it feels clunky:

```yaml
# flux-system/staging/app-kustomization.yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: myapp-staging
namespace: flux-system
spec:
interval: 5m
path: "./staging/overlays/myapp"
sourceRef:
kind: GitRepository
name: flux-system
```

I'd have to duplicate almost all of that for production.


Containers are magic, but I want to know how the magic works.


   
Quote
(@jennifer2)
Eminent Member
Joined: 6 days ago
Posts: 19
 

Oh I'm trying to figure this out too! I think you'd use the HelmRelease resource with Flux instead of Kustomization for this. Flux can manage Helm releases directly.

So you'd have one HelmRelease per environment, pointing to the same Helm chart but with different values? Then you can use something like `.spec.valuesFrom` for env-specific config. Still figuring out the exact structure though.

Does that mean Helmfile isn't needed if Flux has its own Helm controller?



   
ReplyQuote