Version in requirements.yaml

6/25/2019

I want to know how to use place holders in requirements.yaml file for versions field or if there is a way to Implementation Automatic dependencies version

dependencies: - name: nuclei-wallet-async version: {{ .Values.version_dep }} repository: http://127.0.0.1:8879/charts

Declared the version_dep in values.yaml file but doesn't work

-- Saikat Konar
kubernetes-helm

1 Answer

6/26/2019

In general there is no support to parameterize requirements.yaml. Also refer to the official helm documentation for requirement files. It makes no sense as you cant guarentee the helm package functionality if somebody puts random version numbers into the chart dependencies.

An option would be to use conditions.

For example you could introduce values to be evaluated by a condition in requirements.yaml.

# requirements.yaml
dependencies:
      - name: subchart1
        repository: http://localhost:10191
        version: 0.1.0
        condition: subchartversion1.enabled
      - name: subchart1
        repository: http://localhost:10191
        version: 0.2.0
        condition: subchartversion2.enabled

But that would be only a workaround and no best practice.

-- LeonG
Source: StackOverflow