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 <marc.khouzam@montreal.ca>
(cherry picked from commit bf4cc97bbe)
pull/7423/head
Marc Khouzam 6 years ago committed by Matt Farina
parent 73074769a4
commit da496234a8
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -39,6 +39,10 @@ func NewGetValues(cfg *Configuration) *GetValues {
// Run executes 'helm get values' against the given release. // Run executes 'helm get values' against the given release.
func (g *GetValues) Run(name string) (map[string]interface{}, error) { 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) rel, err := g.cfg.releaseContent(name, g.Version)
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save