I'm using kustomize with helm via ArgoCD to manage my Kubernetes clusters, which requires some small changes to the values.yaml files between environments.
My folder structure is:
.
|-- base
| |-- ns.yaml
| |-- kustomization.yaml
| `-- values.yaml
`-- overlay
|-- kustomization.yaml
`-- values.yaml
The helm chart is defined in base/kustomization.yaml, and overlay/kustomization.yaml loads the resources from ../base
I can't find a way to get kustomize to render the chart with the values file in the overlay directory. Is this possible?
I've tried using a HelmChartInflationGenerator resource and patching it - nothing happens
I've tried defining the helm chart again in overlay\kustomization.yaml - I get a duplicate resource conflict
I see a lot of discussions happening around this. As of now, there is no simple and straight forward way you can get around with this. But one thing what you can do is to patch the specific values that have been updated in your overlay layer.
So, the helm chart gets built in your base layer and can patch it with the values you want in the overlay layer.
You can see a detailed discussion around this at https://github.com/kubernetes-sigs/kustomize/issues/4658
In simple your folder structure may look something like this
You will call you patch in overlay/kustomization.yaml as follows.