<p>I am currently creating a helm chart for my fullstack application, and I would like to install a nats helm chart to it as a dependency. I know I can add it as a dependency in the Charts.yml file, but how can I provide the nats chart with a Values.yml to overrride the default nats chart values? What I would like is that when I do a helm install for my application, it also installs the nats dependency but with custom values.yml.</p>
<p>chart.yml dependency section</p>
<pre><code>dependencies:
- name: nats
  repository: &quot;https://nats-io.github.io/k8s/helm/charts&quot;
  version: &quot;0.11.0&quot;
</code></pre>
<p>Then I run <code>helm dependency upgrade</code>. This creates a .tgz under my subcharts as follows</p>
<p><a href="https://i.stack.imgur.com/EtggE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EtggE.png" alt="enter image description here" /></a></p>
<p>I would like to override the default values.yml which are present in the nats chart. I tried by adding the following to the parent values.yml but it did not work (as taken from <a href="https://docs.nats.io/running-a-nats-service/introduction/running/nats-kubernetes/helm-charts#clustering" rel="nofollow noreferrer">https://docs.nats.io/running-a-nats-service/introduction/running/nats-kubernetes/helm-charts#clustering</a>)</p>
<pre><code>nats:
  cluster:
    enabled: true
    replicas: 5

    tls:
      secret:
        name: nats-server-tls
      ca: &quot;ca.crt&quot;
      cert: &quot;tls.crt&quot;
      key: &quot;tls.key&quot;
</code></pre>
<p>Do I need to unpack the chart for it to work?</p>

arthhhhh
<p>This is documented in <a href="https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#overriding-values-from-a-parent-chart" rel="nofollow noreferrer">Helm website</a></p>
<p><em>Overriding Values from a Parent Chart</em></p>
<p>so in your top level chart's <code>values.yaml</code>, use construct like this:</p>
<pre><code>mysubchart:  # this is dependent sub-chart
  subchart-value-key: .... # this is key in subchart's values.yaml
</code></pre>
<p><strong>UPDATE</strong></p>
<p>In your case</p>
<pre class="lang-yaml prettyprint-override"><code>nats:
  cluster:
    enabled: true
    replicas: 5
</code></pre>
<p>works if I do <code>helm template .</code>, rendered statefullset seems to reflect values correctly:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: RELEASE-NAME-nats
  namespace: &quot;default&quot;
  labels:
    helm.sh/chart: nats-0.11.0
    
    app.kubernetes.io/name: nats
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/version: &quot;2.6.5&quot;
    app.kubernetes.io/managed-by: Helm
spec:
  selector:
    matchLabels:
      
      app.kubernetes.io/name: nats
      app.kubernetes.io/instance: RELEASE-NAME
  replicas: 5  # This value has been taken from values.yaml
</code></pre>
<p>So what exactly is not working?</p>
