Skip to content

Commit

Permalink
fixed getReleaseInfo for helmV3
Browse files Browse the repository at this point in the history
  • Loading branch information
ktarplee committed Jan 24, 2020
1 parent 1f1f73b commit 8f1815f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pkg/skaffold/deploy/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,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.
Expand Down Expand Up @@ -444,9 +443,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
}
Expand Down

0 comments on commit 8f1815f

Please sign in to comment.