<p>is there a way to set condition in Chart.yaml file based on variable existency? I want to install dependency just when the variable <code>SERVICE_A_URL</code> is not set. I tried these but helm always try to install dependency.</p>
<pre><code>condition: &quot;not SERVICE_A_URL&quot;
condition: &quot;not defined SERVICE_A_URL&quot;
</code></pre>
<p>Thank you!</p>

Radim
<p>As written <a href="https://helm.sh/docs/topics/charts/#tags-and-condition-fields-in-dependencies" rel="noreferrer">in documentation:</a></p>
<blockquote>
<p>All charts are loaded by default. If tags or condition fields are
present, they will be evaluated and used to control loading for the
chart(s) they are applied to.</p>
</blockquote>
<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. Only the first valid path found in the
list is evaluated and if no paths exist then the condition has no
effect.</p>
</blockquote>
<p>If there is no path specified or there is nothing associated with the path the condition has no effect. You can disable installing the dependency in the <code>values.yaml</code> file.</p>
<p>For example, if you have following <code>Chart.yaml</code> file:</p>
<pre><code>dependencies:
  - name: subchart1
    condition: subchart1.enabled
    tags:
      - front-end
      - subchart1
</code></pre>
<p>and you want to disable charts tagged <code>back-end</code>, in <code>values.yaml</code> you have to assign <code>false</code> value to it:</p>
<pre><code>subchart1:
  enabled: true
tags:
  front-end: false
  back-end: true
</code></pre>
