0
votes

In my parent chart Chart.yaml I have

dependencies:
  - name: postgresql11
    repository: "@myrepo"
    version: 8.9.7
    condition: postgresql11.enabled
  - name: postgresql12
    repository: "@myrepo"
    version: 8.9.7
    condition: postgresql12.enabled

In the same parent chart values.yaml I have:

postgresql11:
  enabled: true

postgresql12:
  enabled: false

My problem is that unless I run helm dep update neither subchart is downloaded and installed (I'm expecting the postgresql11 subchart to be installed). If I run helm dep update both subcharts are pulled, ignoring my ruleset which indicates that only postgresql11 should be installed.

Can anybody shed some light on what I'm doing wrong here, and what the relationship is between helm dependency build/update and the conditional rules in Chart.yaml? I'm also curious why there is an enabled field in Chart.yaml which seems redundant with the condition field? I'm running Helm 3.2.4.

Thanks in advance!

2

2 Answers

1
votes

The command helm dep update does not use values.yaml and that is why your dependencies are updated even if you have them disabled in values.yaml.

To understand the enabled for dependencies, read the section "Tags and Condition fields in dependencies" in the Helm: Charts documentation.

1
votes

helm dependency update command will download all the subchart specified in the dependencies option and download it to the charts/ directory, even you have them disabled in values.yaml. However, only enabled charts will be installed.

To release the new changes/version you need to run the command helm upgrade <chart-name> <chart-dir-location>. Please refer https://helm.sh/docs/helm/helm_upgrade/