fix: Set HelmBinary in execer constructor (#928)

This overrides the default helm command, if provided, as soon as possible.
This way it is already used in `visitStates`.


I ran into an issue using `HELM3` and `--helm-binary` together with helm-secrets. 
I previously used tillerless, which i could now remove. This however caused `DecryptSecret` to fail, as it would still use the helm2 binary; because it runs before the first `helm.SetHelmBinary` call.

While helm-secrets is not fully helm3 compatible yet, its uses within helmfile are, and i was able to just install it as a helm3 plugin.
This commit is contained in:
Jan Möller
2019-11-02 14:15:33 +09:00
committed by KUOKA Yusuke
parent 3f02b86640
commit 6955d07ea8
6 changed files with 10 additions and 19 deletions
+1 -1
View File
@@ -524,7 +524,7 @@ func TestHelmState_flagsForUpgrade(t *testing.T) {
HelmDefaults: tt.defaults,
valsRuntime: valsRuntime,
}
helm := helmexec.New(logger, "default", &helmexec.ShellRunner{
helm := helmexec.New("helm", logger, "default", &helmexec.ShellRunner{
Logger: logger,
})
args, err := state.flagsForUpgrade(helm, tt.release, 0)