Conditions, Tags & Overrides
Toggle subcharts on or off with conditions and tags, and override their values from the parent chart.
dependencies:
- name: redis
condition: redis.enabledYou often want to enable a subchart in some environments but not others, and to configure it without editing its files.
Conditions
A condition points at a boolean value; if it is false, the subchart is skipped. Common pattern: postgresql.enabled.
Tags
A tags entry groups several subcharts under one switch, so a single tag can enable or disable a set of them at once.
Overriding subchart values
From the parent's values.yaml, nest the subchart's values under a key matching the subchart name. Those override the subchart's own defaults.
Example
# Chart.yaml
dependencies:
- name: postgresql
version: "15.5.0"
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
# values.yaml (parent) — toggle and configure the subchart
postgresql:
enabled: true
auth:
username: appuser
database: appdbWhen to use it
- A developer disables the bundled PostgreSQL subchart in production by setting postgresql.enabled: false in values.yaml because production uses a managed RDS instance instead.
- A platform team groups the observability subcharts under a 'monitoring' tag so operators can enable or disable the entire monitoring stack with a single values flag.
- An operator overrides a subchart's default connection pool size from the parent chart's values.yaml by prefixing the key with the subchart name, without touching the subchart itself.
More examples
Condition to toggle subchart
The condition field links the subchart's enabled state to a values key, letting operators disable it without modifying Chart.yaml.
# Chart.yaml
dependencies:
- name: postgresql
version: "13.x.x"
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
# values.yaml
postgresql:
enabled: true # set to false to use external DBTags to group subcharts
Groups related subcharts under a tag so the entire group can be toggled with a single --set or values entry.
# Chart.yaml
dependencies:
- name: prometheus
version: "25.x.x"
repository: https://prometheus-community.github.io/helm-charts
tags: [monitoring]
- name: grafana
version: "7.x.x"
repository: https://grafana.github.io/helm-charts
tags: [monitoring]
# Disable entire monitoring group:
# helm install my-app ./chart --set tags.monitoring=falseOverride subchart values
Sets subchart values from the parent chart's values.yaml by nesting them under the subchart name (or alias), which Helm passes down automatically.
# values.yaml — parent chart overrides subchart config
postgresql:
enabled: true
auth:
postgresPassword: my-secret
database: appdb
primary:
persistence:
size: 20Gi
Discussion