Optional dependency on a helm chart

helm dependencies conditional optional

1 min read | by Jordi Prats

When you are handling helm chart dependencies using helm itself you might face the situation where you don't want to install a dependency based on some condition. Using the Chart.yaml file we can configure it to optionally load a dependency

To do so we just need to add the condition option:

(...)
dependencies:
  - name: minio
    version: 8.0.8
    repository: https://helm.min.io/
    condition: pet2cattle.minio.install

The condition is a yaml path that resolves to a boolean, so if we set it to true it will install the dependency:

pet2cattle:
  minio:
    install: true

Posted on 04/10/2022

Categories