Operating system
Ubuntu 24.04.4 LTS
Helmfile Version
v1.4.4
Helm Version
v4.1.4
Bug description
Up until 1.2.3, an array provided via --state-values-file completely overrides an array defined in a values file referenced in environments.default.values
Starting with 1.3.0 (including the latest 1.4.4), arrays are merged by item position, breaking the expected behavior.
Most likely related to #2367 which was implemented to fix #2353
Example helmfile.yaml
helmfile.yaml
environments:
default:
values:
- values-default.yaml
---
releases:
- name: list
chart: ./list
list/list.yaml.gotmpl
{{- range $item := .Values.list }}
item: {{ $item }}
{{- end }}
values-default.yaml
values-first.yaml
values-second.yaml
Behavior with version <=1.2.3
❯ helmfile template --file helmfile.yaml --state-values-file values-second.yaml
---
item: second
With version >=1.3.0
❯ helmfile template --file helmfile.yaml --state-values-file values-second.yaml
---
item: second
item: second
Error message you've seen (if any)
No error message, just wrong templating output.
Steps to reproduce
https://github.com/Moglum/helmfile-arrays
Working Helmfile Version
v1.2.3
Relevant discussion
No response
Operating system
Ubuntu 24.04.4 LTS
Helmfile Version
v1.4.4
Helm Version
v4.1.4
Bug description
Up until 1.2.3, an array provided via
--state-values-filecompletely overrides an array defined in a values file referenced inenvironments.default.valuesStarting with 1.3.0 (including the latest 1.4.4), arrays are merged by item position, breaking the expected behavior.
Most likely related to #2367 which was implemented to fix #2353
Example helmfile.yaml
helmfile.yamllist/list.yaml.gotmplvalues-default.yamlvalues-first.yamlvalues-second.yamlBehavior with version <=1.2.3
With version >=1.3.0
Error message you've seen (if any)
No error message, just wrong templating output.
Steps to reproduce
https://github.com/Moglum/helmfile-arrays
Working Helmfile Version
v1.2.3
Relevant discussion
No response