<p>I would like to template values in my Chart.yaml file.
For example, <code>version: {{ .Values.version }}</code> instead of <code>version: 0.1.0</code></p>

<p>For other yaml files, the above would work. However, it's my understanding that Helm treats the Chart.yaml differently and <strong>the Chart.yaml file is not run through the templating engine</strong>.</p>

<p>Does anyone know a workaround?</p>

<p>The actual error I get if I try to helm lint this (with <code>version: 0.1.0</code> as an entry in my values.yaml file) is: 
<code>error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.version":interface {}(nil)}</code></p>

<p>You are thinking of the problem backward: specify the version in <code>Chart.yaml</code> and <em>derive</em> the version in wherever you are using it in the templates; you can't have a dynamic version in the <code>Chart.yaml</code> because <code>helm repo index .</code> does not accept <code>--set</code> or any such flag and thus couldn't construct the tgz to upload</p>

<p>Thus, given a <code>Chart.yaml</code>:</p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
name: my-awesome-chart
appVersion: 0.1.0
version: 1.2.3
</code></pre>

<p>and a <code>Deployment.yaml</code> template:</p>

<pre><code>{{ $myTag := .Chart.Version }}
{{/* or, you can use .Chart.AppVersion */}}
apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      containers:
      - image: docker.example.com:{{ $myTag }}
        # produces: docker.example.com:1.2.3
</code></pre>
