From 60e3b2c18ddcf907bb1084d60bd4c66fe8531dec Mon Sep 17 00:00:00 2001 From: "Kyle M. Tarplee" Date: Fri, 8 Nov 2019 11:46:51 -0500 Subject: [PATCH] fixed getReleaseInfo for helmV3 --- pkg/skaffold/deploy/helm.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/skaffold/deploy/helm.go b/pkg/skaffold/deploy/helm.go index 340afab1764..2e6fe162e80 100644 --- a/pkg/skaffold/deploy/helm.go +++ b/pkg/skaffold/deploy/helm.go @@ -215,7 +215,6 @@ func (h *HelmDeployer) deployRelease(ctx context.Context, out io.Writer, r lates } } - // Dependency builds should be skipped when trying to install a chart // with local dependencies in the chart folder, e.g. the istio helm chart. // This decision is left to the user. @@ -433,9 +432,21 @@ func (h *HelmDeployer) packageChart(ctx context.Context, r latest.HelmRelease) ( } func (h *HelmDeployer) getReleaseInfo(ctx context.Context, release string) (*bufio.Reader, error) { + + helmV3, err := h.isHelmV3(ctx) + if err != nil { + return nil, errors.Wrap(err, "cannot get helm version") + } + var releaseInfo bytes.Buffer - if err := h.helm(ctx, &releaseInfo, false, "get", release); err != nil { - return nil, fmt.Errorf("error retrieving helm deployment info: %s", releaseInfo.String()) + if helmV3 { + if err := h.helm(ctx, &releaseInfo, false, "get", "all", release); err != nil { + return nil, fmt.Errorf("error retrieving helm deployment info: %s", releaseInfo.String()) + } + } else { + if err := h.helm(ctx, &releaseInfo, false, "get", release); err != nil { + return nil, fmt.Errorf("error retrieving helm deployment info: %s", releaseInfo.String()) + } } return bufio.NewReader(&releaseInfo), nil }