helm / helm/community

how to set value of subchart based on value of parent chart?

Open
#427 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
495
Forks
210
PR merge metrics
No merged PRs in 30d

Description

My chart has elasticsearch as subchart:
```
- name: elasticsearch
repository: oci://registry-1.docker.io/bitnamicharts
version: 21.4.x
condition: tags.elasticsearch
```

and my chart has a flag "highAvailability", if user set it to true, I want to set elasticsearch.master.replicaCount = 3, otherwise set it to 1.

There are many similar values in subcharts, so I want to user can tigger ha mode by setting single "highAvailability", instead of set many flags one by one.

Now I have a values-ha.yaml which includes all the values that should be set when "highAvailability" is set to true, however my user need to obtain this values-ha.yaml file from somewhere before helm install, either by downloading the whole helm package file and extract this values-ha.yaml file to disk, or get it from other distribute channel, then use the "-f" flag of helm command.

What is the best practice?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.