flux-check-hook icon indicating copy to clipboard operation
flux-check-hook copied to clipboard

Supporting overlays via flux-local?

Open allenporter opened this issue 2 years ago • 2 comments

I'm working on https://github.com/allenporter/flux-local which is a library for extracting resources out of flux kustomizations, HelmRepository, and HelmRelease and building templates. I was considering generalizing my pre-commit and tests and then came across your library which is great and taking a similar approach. Would you be interested in integrating flux-local to help with things like handling overlays and kustomize build and potentially applying kyverno policies if you are interested in that as well? If so, i'm happy to send a PR. If not, no worries!

allenporter avatar Feb 09 '23 05:02 allenporter

Yes, that sounds really good and totally in line with what I was doing and the intention of this pre commit hook. So a PR is very welcome.

tarioch avatar Feb 09 '23 06:02 tarioch

One gap that I realized late in the game here is that the approach of flux-local currently does not work if you set up a flux kustomization without an actual kustomization.yaml. To elaborate, what it does is searches your repo for flux Kustomizations, then will kustomize build each one to find more Kustomizations and HelmRelease and HelmRepositorys and that build step won't work without creating an explicit file.

I imagine this is common enough that I probably need an answer for this first? https://github.com/allenporter/flux-local/issues/78 has more background

allenporter avatar Feb 24 '23 15:02 allenporter