How does `condition` work on a dependency?
BeginnerConceptDependencies, Subcharts & Library Charts
Answer
condition is a values path (or comma-separated list of paths, first one found wins) that enables or disables the subchart:
dependencies:
- name: shop-postgres
condition: postgres.enabled
helm upgrade shop ./shop --set postgres.enabled=false --set externalDatabase.host=shop.xxxx.rds.amazonaws.com
When disabled, none of the subchart's templates render. This is the standard way to use an in-cluster database in dev and RDS in prod with the same chart.
More on Dependencies, Subcharts & Library Charts
How do you declare a chart dependency in Helm 3?BeginnerWhat is the difference between `helm dependency update` and `helm dependency build`?IntermediateWhat is `Chart.lock` and why commit it?BeginnerWhat are `tags` on dependencies?IntermediateWhat does `alias` do on a dependency?IntermediateWhat is `import-values`?Advanced