<p>I searched for hours, but I can't find any solution for my problem.</p>

<p>Short Version: Is it possible to genarate new <code>.Value</code> properties at templating time?</p>

<p>Long Version: I want to deploy the ElasticStack with Logstash, Kibana, Elasticsearch and I want to use the offical helm templates for Kibana and Elasticsearch.</p>

<p>My Idea is to create a new Chart (elk) with the 3 subcharts.</p>

<pre><code>elk
    charts
        elasticsearch (official helm template)
            values.yaml
        kibana (official helm template)
            values.yaml
        logstash
            values.yaml
    templates
    values.yaml
</code></pre>

<p>My problem is the multiple declaration of the same property in the top-level <code>values.yaml</code></p>

<p>My <code>elk/values.yaml</code> looks like the following</p>

<pre><code>elasticsearch:
  clusterName: "elasticsearchtest"
  imageTag: "7.3.0"
  replicas: 3
  minimumMasterNodes: 2
  volumeClaimTemplate:
    storageClassName: gp2-resize

kibana:
  elasticsearchHosts: "http://elasticsearchtest-master:9200"
  imageTag: "7.3.0"


logstash:
  elasticsearchHosts: "http://elasticsearchtest-master:9200"
  imageTag: "7.3.0"
</code></pre>

<p>Note the repitition if I want to change the <code>clustername</code> or specify the <code>imagetag</code>. It feels really bad to overwrite the subcharts' values in this way. </p>

<p>It is possible to create a top-level <code>values.yaml</code> like this:</p>

<pre><code>clusterName: "elasticsearchtest"
imageTag: "7.3.0"
</code></pre>

<p>and overwrite the subcharts values at templating time?</p>

<p>There is no way to template values.yaml, if you are not going to use external tools (eg. Ytt)</p>

<p><a href="https://github.com/helm/helm/issues/2492" rel="nofollow noreferrer">https://github.com/helm/helm/issues/2492</a></p>

<p>However, if you can change values.yaml in the subcharts, then you can assign it to the global variables, and define them once in the parent Helm chart.</p>
