Operating system
Ubuntu 18.04 LTS
Helmfile Version
0.145.2
Helm Version
v3.9.0
Bug description
Passing the helm upgrade flag "--reuse-values" via the "--args" option to "helmfile sync" and "helmfile apply" has no effect.
Example:
This is a simple helm chart containing one config-map with two values "first_name" and "last_name".
We want to update these values using helmfile following the steps below:
The content of "staging-values-01.yaml":
first_name: "spring"
last_name: "boot"
The content of "staging-values-02.yaml":
- Run helmfile for the 1st time:
helmfile -f helmfile.yaml sync --values staging-values-01.yaml
As expected, "first-name" will be "spring" and "last_name" will be "boot".
- ReRun helmfile with different values:
helmfile -f helmfile.yaml sync --values staging-values-02.yaml --args "--reuse-values"
Let say we want to update only the "last_name" and we omitted "first_name" from the values.yaml since we expect that it will remain the same:
What happens after running the command is that the "last_name" is updated, but the "first_name" which is removed in the "staging-values-02.yaml" has been restored to the default value of the chart instead of remaining at the previous value.
So instead of having "first_name: spring" and "last_name: mvc", we got "fist_name: lorem" and "last_name: mvc"
We observed the same behaviour with "helmfile sync" and "helmfile update".
Otherwise, in case this is expected, how to achieve the desired result of updating only a subset of values, the behavior of "--reuse-values", using helmfile args/options.
Example helmfile.yaml
releases:
- name: simple-chart
namespace: staging
chart: ./simple-chart
Error message you've seen (if any)
There is no error message but the result of the execution is not as expected.
Steps to reproduce
https://github.com/Hamdiovish/helmfile-args-report
Relevant discussion
No response