From bf4cc97bbe7ca994894a87df63fdf7da6ee0841a Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 3 Dec 2019 08:48:44 -0500 Subject: [PATCH] fix(cli): IsReachable check for "get values" The 'helm get values' has its own Run() method in the action package. So, unlike the other 'get' variants, it needs to check for the reachability of the cluster itself. Signed-off-by: Marc Khouzam --- pkg/action/get_values.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/action/get_values.go b/pkg/action/get_values.go index 5bc3a7005..9c32db213 100644 --- a/pkg/action/get_values.go +++ b/pkg/action/get_values.go @@ -39,6 +39,10 @@ func NewGetValues(cfg *Configuration) *GetValues { // Run executes 'helm get values' against the given release. func (g *GetValues) Run(name string) (map[string]interface{}, error) { + if err := g.cfg.KubeClient.IsReachable(); err != nil { + return nil, err + } + rel, err := g.cfg.releaseContent(name, g.Version) if err != nil { return nil, err