Is it possible to set a value of an embedded chart?

3/21/2019

I noticed that some charts have other charts embedded within them. For example, https://github.ibm.com/IBMPrivateCloud/charts/tree/master/stable/ibm-dsm-dev includes an embedded chart for db2.

I was hoping to set a value for the embedded chart from the command line using a --set argument, but unfortunately it seems like that only applies to the parent chart's values.

Is it possible to set a value that is used in the embedded chart or do I need to clone it all locally to edit those?

-- lmsurprenant
kubernetes-helm

2 Answers

3/22/2019

Yes, you can set subchart values using a --set. Use --set subchartName.key=value.

Please see overriding values of a child chart

Chart.yaml

apiVersion: v1
appVersion: "0.1.0"
description: A monitoring Helm chart for Kubernetes
name: "monitoring"
version: "0.1.0"

requirements.yaml

dependencies:
- name: grafana
  version: "2.3.0"
  repository: "https://kubernetes-charts.storage.googleapis.com"

Example:

helm template . | grep -A1 "spec:" | grep type
type: ClusterIP

Using --set subchart.key=value

helm template . --set grafana.service.type=NodePort | grep -A1 "spec:" | grep type
type: NodePort
-- edbighead
Source: StackOverflow

3/22/2019

You can, i.e. if the requirement is db2 and you want to set a custom image, it would be db2.image=whatever

If you are using an alias for your requirement, then use the alias name instead of db2

-- marcostvz
Source: StackOverflow