<p>We are using Helm Charts for deploying a service in several environments on Kubernetes cluster. Now for each environment there are a list of variables like the database url, docker image tag etc. What is the most obvious and correct way of defining Helm related values.yaml in such case where all the Helm template files remain same for all the environment except for some parameters as stated above. </p>

<p>One way to do this would be using multiple value files, which helm now allows.  Assume you have the following values files:</p>

<p>values1.yaml:</p>

<pre><code>image:
  repository: myimage
  tag: 1.3
</code></pre>

<p>values2.yaml</p>

<pre><code>image:
  pullPolicy: Always
</code></pre>

<p>These can both be used on command line with helm as:</p>

<pre><code>$ helm install -f values1.yaml,values2.yaml &lt;mychart&gt;
</code></pre>

<p>In this case, these values will be merged into</p>

<pre><code>image:
  repository: myimage
  tag: 1.3
  pullPolicy: Always
</code></pre>

<p>You can see the values that will be used by giving the "--dry-run --debug" options to the "helm install" command.</p>

<p>Order is important.  If the same value appears in both files, the values from values2.yaml will take precedent, as it was specified last.  Each chart also comes with a values file.  Those values will be used for anything not specified in your own values file, as if it were first in the list of values files you provided.</p>

<p>In your case, you could specify all the common settings in values1.yaml and override them as necessary with values2.yaml.</p>
