Handling shared Kubernetes objects between multiple Helm charts

6/4/2019

I've recently asked a question about how to structure multiple applications which should be bundled together and am thinking of going down a route of having each separate application have it's own Helm chart and own ingress controller. This would allow for CI/CD to update each component easily without affecting the rest.

I was also thinking about using a "Umbrella" chart to specify versions of the other charts when it comes to actual releases and keep that in another repo.

However, when using multiple Helm charts with an ingress controller for each, how would I handle some objects which are shared between them? Such as secrets, TLS issuers and volumes shared between these? I could put them in the umbrella chart but then I'd lose the benefit of being able to use this in CI/CD. I could duplicate them inside each individual chart but that seems wrong to me. I'm thinking that I'd need another Helm chart to manage these resources alone.

Is there a suggested standard for doing this or what way would you reccomend?

-- James B.
kubernetes
kubernetes-helm
kubernetes-ingress
nginx-ingress

1 Answer

6/5/2019

You can create one helm chart and inside of it your subcharts for app A, app B, and Shared chart, and you can define global Values for shared objects, and use this names in templates of main subcharts of app A & B.

For more information about subchart and global values, check this

-- coolinuxoid
Source: StackOverflow