tarioch / flux-check-hook

MIT License
29 stars 6 forks source link

Supporting overlays via flux-local? #6

Open allenporter opened 1 year ago

allenporter commented 1 year ago

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!

tarioch commented 1 year ago

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.

allenporter commented 1 year ago

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