<p>I've created a custom helm chart with <code>elastic-stack</code> as a subchart with following configurations.</p>

<pre><code># requirements.yaml
dependencies:
  - name: elastic-stack
    version: 1.5.0
    repository: '@stable'
</code></pre>

<pre><code># values.yaml
elastic-stack:
  kibana:
    # at this level enabled is not recognized (does not work)
    # enabled: true

    # configs like env, only work at this level
    env:
      ELASTICSEARCH_URL: http://foo-elasticsearch-client.default.svc.cluster.local:9200
    service:
      externalPort: 80

# enabled only works at root level
elasticsearch:
  enabled: true
kibana:
  enabled: true
logstash:
  enabled: false
</code></pre>

<p>What i don't get is why i have to define the <code>enabled</code> tags outside the <code>elasatic-stack:</code> and all other configurations inside?</p>

<p>Is this a normal helm behavior or some misconfiguration in elastic-stack chart?</p>

cebor
<p><a href="https://helm.sh/docs/developing_charts/#tags-and-condition-fields-in-requirements-yaml" rel="noreferrer">Helm conditions</a> are evaluated in the top parent's values:</p>

<blockquote>
  <p>Condition - The condition field holds one or more YAML paths
  (delimited by commas). If this path exists in the top parent’s values
  and resolves to a boolean value, the chart will be enabled or disabled
  based on that boolean value</p>
</blockquote>

<p>Take a look at the conditions in <a href="https://github.com/helm/charts/blob/dbfe5e6b55f67ddb513e41a4417160a1ab8c7b6d/stable/elastic-stack/requirements.yaml" rel="noreferrer">requirements.yaml</a> from stable/elastic-stack:</p>

<pre><code>- name: elasticsearch
  version: ^1.17.0
  repository: https://kubernetes-charts.storage.googleapis.com/
  condition: elasticsearch.enabled
- name: kibana
  version: ^1.1.0
  repository: https://kubernetes-charts.storage.googleapis.com/
  condition: kibana.enabled
- name: logstash
  version: ^1.2.1
  repository: https://kubernetes-charts.storage.googleapis.com/
  condition: logstash.enabled
</code></pre>

<p>The conditions paths are <code>elasticsearch.enabled</code>, <code>kibana.enabled</code> and <code>logstash.enabled</code>, so you need to use them in your parent chart values.</p>
