<p>In our Jenkins pipeline, I'm using a bash script to call the <code>helm install</code> command. We have a <code>values.yaml</code> containing most of the values to be passed to helm. However, few values are based upon <code>environment variables</code> and have to be passed using the <code>--set</code> argument. Here is the snippet:</p>
<pre class="lang-bash prettyprint-override"><code>helm install $RELEASE_NAME shared/phoenixmsp-app -f value.yaml \
    --set global.env.production=$production \
    --set global.cluster.hosts=${CONFIG[${CLUSTER_NAME}]} \
    --set nameOverride=$RELEASE_NAME \
    --set fullnameOverride=$RELEASE_NAME \
    --set image.repository=myhelm.hub.mycloud.io/myrepo/mainservice \
    --set-string image.tag=$DOCKER_TAG \
    --wait --timeout 180s --namespace $APP_NAMESPACE&quot;
</code></pre>
<p>We want to move these <code>--set</code> parameters to <code>values.yaml</code>. The goal is to get rid of <code>--set</code> and simply pass the <code>values.yaml</code>.</p>
<h3>Question: Is it possible to expand Environment Variables in <code>values.yaml</code> while calling with <code>helm install</code> or <code>helm upgrade</code>?</h3>

Farrukh Waheed
<p>The only way I think you can do that, if you <em>really</em> want to use a single yaml is to have a template <code>values.yaml</code> and either <code>sed</code> the values into it or use a templating language like <code>jinja</code> or <code>mustache</code>, then feed the resulting output into helm.</p>
