<p>If I have a chart that depends on another chart, what's the best practices around when it should be included as a package in the <code>charts/</code> directory vs <code>requirements.yaml</code> vs the <code>dependencies</code> property in <code>Chart.yaml</code>?</p>
<p>For example, if I have a shared dependency that multiple Helm charts will use, should I always put that in a Helm repo and then just refer to it in each chart's <code>requirements.yaml</code>? Or is there a benefit to including it in the <code>charts/</code> directory?</p>
<p><strong>Example</strong></p>
<p><em>requirements.yaml</em></p>
<pre class="lang-yaml prettyprint-override"><code>dependencies:
  - name: mariadb
    version: 7.x.x
    repository: https://charts.bitnami.com/bitnami
    condition: mariadb.enabled
    tags:
      - wordpress-database
</code></pre>
<p><em>Chart.yaml</em></p>
<pre class="lang-yaml prettyprint-override"><code>dependencies:
  - name: mariadb
    version: 7.x.x
    repository: https://charts.bitnami.com/bitnami
    condition: mariadb.enabled
    tags:
      - wordpress-database
</code></pre>
<p><em>charts/ directory</em></p>
<pre><code>my-package.tgz
  /charts
     mariadb-7.0.0.tgz
     ...elided...
</code></pre>
<p>(and there's technically a 4th where I put the actual exploded chart into the charts directory)</p>

Don Rhummy
<p><strong>If you need both Helm 2 and Helm 3 compatibility</strong>, include it in a separate <code>requirements.yaml</code> file.  Most charts will work fine with either version of Helm (if the CLIs are somewhat different) so if your environment still needs Helm 2 compatibility, this is your best choice.</p>
<p><strong>If you don't need Helm 2 compatibility</strong>, listing it in the <code>Chart.yaml</code> file is one file fewer.</p>
<p>I'd only manually download the chart (or unpack it) if I had a specific requirement to, probably because my product is uncomfortable downloading software from the public Internet without specifically verifying or approving it.  Even then, it's common to have an internal repository of approved artifacts, and it'd be better to point the <code>requirements.yaml</code>/<code>Chart.yaml</code> at that repository than to keep an extra copy.  (How do you handle open-source library dependencies in general?)</p>
<p>Even if you have a local dependency chart or support chart library, it's better to properly version it and publish it to a chart repository than to replicate its tarball in <code>charts/</code> directories.  The only benefit to putting a dependency in <code>charts/</code> is not needing to have it in a repository, but you'll usually want a repository for ease of management.</p>
