<p>Hi i need to make these Options changeabel:</p>
<h3>values.yaml</h3>
<pre><code>connector:
  proxyname: &quot;xx.${{ .Values.context }}.xx.xx&quot;

ingress:
  hosts:
    - host: xx.${{ .Values.context }}.xx.xx
  tls:
      hosts: 
        - xx.${{ .Values.context }}.xx.xx
</code></pre>
<p>my understanding was i can call it now like this:</p>
<pre><code>helm install newpod -f ... --set context=${{ github.event.inputs.context }} .
</code></pre>
<p>But after i call this i get the following message:</p>
<pre><code>.... [spec.rules[0].host: Invalid value: &quot;xx.{{ .Values.context }}.xx.xx&quot; ....
</code></pre>
<p>how can i deal with it?</p>

Klatuu
<p>This can be achieved <a href="https://helm.sh/docs/howto/charts_tips_and_tricks#using-the-tpl-function" rel="nofollow noreferrer">using tpl function</a></p>
<p><strong>values.yaml</strong></p>
<pre class="lang-yaml prettyprint-override"><code>context: test

connector:
  proxyname: &quot;xx.{{ .Values.context }}.xx.xx&quot;
</code></pre>
<p><strong>manifest.yaml</strong></p>
<pre class="lang-yaml prettyprint-override"><code>test: {{ tpl .Values.connector.proxyname . }} 
</code></pre>
<p>If you need to use them in your ingress inside a range, use <code>$</code> to point to the root context</p>
<p><strong>ingress.yaml</strong></p>
<pre class="lang-yaml prettyprint-override"><code>...
spec:
  {{- if .Values.ingress.tls }}
  tls:
    {{- range .Values.ingress.tls }}
    - hosts:
        {{- range .hosts }}
        - {{ tpl . $ | quote }}
        {{- end }}
      secretName: {{ .secretName }}
    {{- end }}
  {{- end }}
  rules:
    {{- range .Values.ingress.hosts }}
    - host: {{ tpl .host $ | quote }}
      http:
        paths:
...
</code></pre>
<p><strong>NOTES.txt</strong></p>
<pre><code>...
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ tpl $host.host $ }}{{ . }}
...
</code></pre>
