Skip to content

Fix HELM_DIFF_USE_UPGRADE_DRY_RUN to work for new installs #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
return nil, fmt.Errorf("`diff upgrade --dry-run` conflicts with HELM_DIFF_USE_UPGRADE_DRY_RUN_AS_TEMPLATE. Either remove --dry-run to enable cluster access, or unset HELM_DIFF_USE_UPGRADE_DRY_RUN_AS_TEMPLATE to make cluster access unnecessary")
}

if d.isAllowUnreleased() {
// Otherwise you get the following error when this is a diff for a new install
// Error: UPGRADE FAILED: "$RELEASE_NAME" has no deployed releases
flags = append(flags, "--install")
}

flags = append(flags, "--dry-run")
subcmd = "upgrade"
filter = func(s []byte) []byte {
Expand Down