<p>I'll give the context first then the problem: I am interested in centralising a set of values that would be in my values.yaml.</p>
<p>Initial plan was to create a config map with the centralised values that I could load using the <a href="https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-lookup-function" rel="nofollow noreferrer">lookup</a> helm function. Sadly for me the CD tool I use (<a href="https://argo-cd.readthedocs.io/en/stable/" rel="nofollow noreferrer">ArgoCD</a>) doesn't support lookup.</p>
<p>Current chain of thought would be to create a dummy helm chart that would contain the centralised values. I would set this helm chart as a dependency. Can I get some outputs out of this dependancy that can be used elsewhere? If yes, how to refer to them in the values.yaml?</p>

Fran
<p>Figured it is possible by 2 ways:</p>
<ul>
<li>Exporting/Importing child values: <a href="https://helm.sh/docs/topics/charts/#importing-child-values-via-dependencies" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts/#importing-child-values-via-dependencies</a> and I found a great related answer: <a href="https://stackoverflow.com/questions/70506589/how-to-use-parameters-of-one-subchart-in-another-subchart-in-helm">How to use parameters of one subchart in another subchart in Helm</a></li>
<li>Using &quot;Templates&quot;: <a href="https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#sharing-templates-with-subcharts" rel="nofollow noreferrer">https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#sharing-templates-with-subcharts</a> &quot;Parent charts and subcharts can share templates. Any defined block in any chart is available to other charts.&quot;</li>
</ul>
<p>I create one chart &quot;data&quot; that doesn't create anything but creates template function (for example &quot;data.project&quot;) then I use another</p>
<pre><code>├── Chart.lock
├── Chart.yaml
├── charts
│   ├── data
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── _helpers.tpl
│   │   └── values.yaml
│   ├── sub0
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── configmap.yaml
│   │   └── values.yaml
└── values.yaml
</code></pre>
<p><code>charts/data/templates/_helpers.tpl</code> contains:</p>
<pre><code>{{- define &quot;data.project&quot; -}}
    project_name
{{- end }}
</code></pre>
<p>The top <code>Chart.yaml</code> contains:</p>
<pre><code>---
apiVersion: v2
name: multi
type: application
version: 0.1.0
appVersion: &quot;1.16.0&quot;

dependencies:
  - name: data
    version: 0.1.0
    repository: &quot;file://charts/data&quot; # This is while testing locally, once shared in a central repository this will achieve the centralised data information
    import-values:
      - data
  - name: sub0
    version: 0.1.0
    repository: &quot;file://charts/sub0&quot;
</code></pre>
<p>Then from anywhere I can do:</p>
<pre><code>&quot;{{ include \&quot;data.project\&quot; . }}&quot;
</code></pre>
<p>And obtain the value</p>
<p>Of course the &quot;data&quot; chart will need to live in a separate repository</p>
