<p>I have a parent chart which contains 4 subcharts, out of these I want to deploy the 1 specific subchart to different namespace and all the template files in that subchart are referring to <code>{{ .Release.Namespace. }}</code>. Is their any way to modify the <code>.Release.Namespace.</code> of subchart from the parent chart?</p>

3br10ee032
<p>I don't believe this is possible using vanilla Helm and charts you don't control.</p>
<p>When a chart depends on a subchart, there's fairly little that it's possible to customize.  The parent chart can provide a default set of values for the subchart, but nothing computed, and those can be overridden by the person running <code>helm install</code>.</p>
<p>If, and only if, the subchart is specifically written to deploy into an alternate namespace</p>
<pre class="lang-yaml prettyprint-override"><code># Every object in the subchart must have this configuration
metadata:
  namespace: {{ .Values.namespace | default .Release.Namespace }}
</code></pre>
<p>then you could supply that value to the subchart; but this isn't a default configuration.</p>
<p>My general experience has been that Helm &quot;umbrella charts&quot; are inflexible in a couple of important ways.  There are higher-level tools like <a href="https://github.com/roboll/helmfile" rel="noreferrer">Helmfile</a> and <a href="https://github.com/Praqma/helmsman" rel="noreferrer">Helmsman</a> that provide a single-command installation of multiple Helm charts with a full set of options (Helmsman is simpler, Helmfile allows Helm-style templating almost everywhere which is both more powerful and more complex).  If you need to install four charts, three into one namespace and one into another, these tools might work better.</p>
