From 77185d31a95e5e66bb65a082ab0ed5cbf27a6192 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 12 Apr 2019 11:52:32 +0100 Subject: [PATCH] Fix reset force which hangs Tiller pod removed Closes #5592 Signed-off-by: Martin Hickey --- cmd/helm/reset.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index 887ce34d0..8093d3e69 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "os" + "strings" "github.com/spf13/cobra" @@ -59,7 +60,11 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { Short: "uninstalls Tiller from a cluster", Long: resetDesc, PreRunE: func(cmd *cobra.Command, args []string) error { - if err := setupConnection(); !d.force && err != nil { + err := setupConnection() + if !d.force && err != nil { + return err + } + if d.force && err != nil && strings.EqualFold(err.Error(), "could not find tiller") { return err } return nil