Re: How to override the default helm chart values in values.yaml using hapi?


benjamin <benjamin_wang@...>
 

 

I tried to use command “helm install —set app1.key1=abc my chart”, and it worked. So I read the source code helm command, eventually I figured out the root cause.

The structure of the values map should be hierarchical.

Previously the value map was created with the following code,

 

Values := make(map[string]interface{})

values[“app1.key1”] = “abc”

 

The above code isn’t correct, and it should be something as below,

Base := make(map[string]interface{})

InnerApp1 = make(map[string]interface{})

innerApp1[“key1”] = “abc”

base[“app1”] = innerApp1 

Join cncf-helm@lists.cncf.io to automatically receive all group messages.