Helm download dependencies based on a condition

2/8/2019

I'm using helm charts to deploy around 15 microservices. There is a parent helm chart with requirements.yaml where the all the required microservices are listed as dependencies.

Sample requirements.yaml file:

dependencies:
  - name: service1
    repository: "@stable"
    version: <version>
  - name: service2
    repository: "@stable"
    version: <version>
  - name: service3
    repository: "@stable"
    version: <version>
  - name: service4
    repository: "@stable"
    version: <version>
    condition: false

When I run helm dependency update all the charts that are listed as dependency are downloaded. There are scenarios where few services are under development and are not required to be deployed in production.

We have different artifactory for prod and non-prod environment and the disabled services are not in prod artifactory. Hence it gives an error saying helm chart missing. I understand that the condition flag doesn't install the dependency but how can I stop it from downloading the dependency ?

-- Keerthana
kubernetes-helm

0 Answers