# How to set Helm Chart dependencies with KOTS Boolean config

**URL:** <https://community.replicated.com/t/how-to-set-helm-chart-dependencies-with-kots-boolean-config/1556>\
**Category:** Packaging an application\
**Tags:** kots, helm\
**Created:** [July 11, 2025, 3:43am UTC](https://community.replicated.com/t/how-to-set-helm-chart-dependencies-with-kots-boolean-config/1556 "2025-07-11T03:43:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GerardNguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/gerardnguyen/32/828_2.png) [@GerardNguyen](https://community.replicated.com/u/GerardNguyen)\
**Post date:** [July 11, 2025, 3:43am UTC](https://community.replicated.com/t/how-to-set-helm-chart-dependencies-with-kots-boolean-config/1556/1 "2025-07-11T03:43:33Z")

</div>

Helm allows you to conditionally include dependency charts using the `dependencies.condition` field in your Chart.yaml:

```yaml
# parentchart/Chart.yaml
dependencies:
  - name: subchart1
    version: 0.1.0
    condition: global.subchart1.enabled

```

The `condition` field expects a boolean value (`true` or `false`). When Helm encounters non-boolean values, it will generate a warning during template rendering or installation:

```auto
Warning: Condition path 'global.subchart1.enabled' for chart subchart1 returned non-bool value

```

**Important:** Even with this warning, Helm will still evaluate the condition using Go template truthiness rules:

- Empty string `""` → `false` (chart excluded)
- Any non-empty string → `true` (chart included, even `"false"` or `"0"`)

This can lead to unexpected behavior where charts are included when you expect them to be excluded.

## Mapping KOTS Config Values to Boolean Conditions

KOTS boolean configuration options return string values `"0"` or `"1"` rather than true boolean values. To properly map these to Helm’s boolean expectations, use the `ConfigOptionEquals` template function:

```yaml
apiVersion: kots.io/v1beta2
kind: HelmChart
metadata:
  name: <chart>
spec:
  chart:
    name: <chart>
    chartVersion: 0.1.0
  helmUpgradeFlags:
    - --debug
  values:
    global:
      subchart1:
        enabled: repl{{ ConfigOptionEquals "subchart1_enabled" "1" }}

```

## Why This Approach Works

- `ConfigOptionEquals "subchart1_enabled" "1"` returns a proper boolean (`true` or `false`)
- This eliminates the Helm warning about non-boolean values
- The chart inclusion behavior becomes predictable and matches user expectations

You can also use other KOTS template functions for other config values:

```yaml
# For dropdown configs  
enabled: repl{{ ConfigOptionEquals "deployment_mode" "full" }}

```

By using proper boolean conversion, you ensure reliable chart dependency behavior and eliminate confusing warning messages.
