Skip to content

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

@shaofeng66

Description

@shaofeng66

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions