Merge pull request #143 from mumoshu/fix-helm-diff-deprecation-warning
Fix the helm-diff deprecation warning
This commit is contained in:
commit
09f19047bd
|
|
@ -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).
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue