From ac70e45bffb3c5297e67c50fb9687aa1ac456396 Mon Sep 17 00:00:00 2001 From: Yusuke KUOKA Date: Fri, 11 May 2018 16:51:44 +0900 Subject: [PATCH 1/2] Fix the helm-diff deprecation warning Resolves #130 --- helmexec/exec.go | 2 +- helmexec/exec_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helmexec/exec.go b/helmexec/exec.go index 765b4b2f..dc587771 100644 --- a/helmexec/exec.go +++ b/helmexec/exec.go @@ -74,7 +74,7 @@ func (helm *execer) DecryptSecret(name string) (string, error) { } func (helm *execer) DiffRelease(name, chart string, flags ...string) error { - out, err := helm.exec(append([]string{"diff", name, chart}, flags...)...) + out, err := helm.exec(append([]string{"diff", "upgrade", name, chart}, flags...)...) helm.write(out) return err } diff --git a/helmexec/exec_test.go b/helmexec/exec_test.go index f6ca497c..da2c3e01 100644 --- a/helmexec/exec_test.go +++ b/helmexec/exec_test.go @@ -132,14 +132,14 @@ func Test_DiffRelease(t *testing.T) { var buffer bytes.Buffer helm := MockExecer(&buffer, "dev") helm.DiffRelease("release", "chart", "--timeout 10", "--wait") - expected := "exec: helm diff release chart --timeout 10 --wait --kube-context dev\n" + expected := "exec: helm diff upgrade release chart --timeout 10 --wait --kube-context dev\n" if buffer.String() != expected { t.Errorf("helmexec.DiffRelease()\nactual = %v\nexpect = %v", buffer.String(), expected) } buffer.Reset() helm.DiffRelease("release", "chart") - expected = "exec: helm diff release chart --kube-context dev\n" + expected = "exec: helm diff upgrade release chart --kube-context dev\n" if buffer.String() != expected { t.Errorf("helmexec.DiffRelease()\nactual = %v\nexpect = %v", buffer.String(), expected) } From 52507de39bcfa05c5d6591334c01b3d3ee56eb41 Mon Sep 17 00:00:00 2001 From: Yusuke KUOKA Date: Fri, 11 May 2018 21:52:08 +0900 Subject: [PATCH 2/2] Mention about the minimum ver. of helm-diff --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 004f806e..c9afb9c9 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ dependencies of any referenced local charts. The `helmfile diff` sub-command executes the [helm-diff](https://github.com/databus23/helm-diff) plugin across all of the charts/releases defined in the manifest. -To supply the diff functionality Helmfile needs the `helm diff` plugin installed. For Helm 2.3+ +To supply the diff functionality Helmfile needs the [helm-diff](https://github.com/databus23/helm-diff) plugin v2.9.0+1 or greater installed. For Helm 2.3+ you should be able to simply execute `helm plugin install https://github.com/databus23/helm-diff`. For more details please look at their [documentation](https://github.com/databus23/helm-diff#helm-diff-plugin).