pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

Pulumi Helm Release not following Helm values precedence

Open jlabedo opened this issue 3 years ago • 1 comments

Following https://helm.sh/docs/chart_template_guide/values_files/, values provided to the chart come from multiple sources, in this order:

  • The values.yaml file in the chart
  • If this is a subchart, the values.yaml file of a parent chart
  • A values file if passed into helm install or helm upgrade with the -f flag (helm install -f myvals.yaml ./mychart)
  • Individual parameters passed with --set (such as helm install --set foo=bar ./mychart)

With Pulumi, setting valueYamlFiles and values in the same Release resource seems to give precedence to valueYamlFiles instead of values map.

The issue may be fixed by changing the order of the parameters in : https://github.com/pulumi/pulumi-kubernetes/blob/eff06344d7f9f0d862d7f63e8aae252253fb5af9/provider/pkg/provider/helm_release.go#L302 with : release.Values, err = mergeMaps(values, release.Values)

jlabedo avatar May 13 '22 16:05 jlabedo

Thanks @jlabedo - would you be interested in opening a PR for this issue?

viveklak avatar Jun 01 '22 15:06 viveklak

@jlabedo Did you find a way to fix this? I have the same issue

erwen avatar Aug 22 '22 06:08 erwen