<p>Is there a way to define a common helm chart template for a set of services and extend those templates on need basis?</p>
<p>All my micro services are <strong>spring-boot</strong> based and are deployed on <strong>Kubernetes</strong> cluster. I use helm chart templates for the deployment manifest files. There is a lot of common configuration across those helm charts. So, I'd like to have a default template file which all the services can use which includes default declarations like Kubernetes resource requests and limits, the default environment variables, namespace details etc.</p>
<p>Each microservice, now should be able to extend the common chart as required. For example: the services could add a list of additional environment variables.</p>

krisnik
<p>This sounds a lot like you would need a so called Library chart.</p>
<p><a href="https://helm.sh/docs/topics/library_charts/" rel="nofollow noreferrer">Library charts</a> in helm do not instantiate objects in k8s, but rather provide reusable templates. In that library chart, you define the deployment, service and other components as templates in a <code>tpl</code> file. Later, you then import the library chart in you concrete helm charts and use the defined templates.</p>
<p>The templates itself can be heavily parameterized themselves allowing you to customize for example a deployment template with custom env vars.</p>
