Skip to content

Force upgrade Helm releases missing a successful deployment

Aaron Walker requested to merge (removed):helm-upgrade-force-install into master

What does this MR do?

This MR is a workaround for a Helm bug that prevents upgrading a release that does not have a successful deployment (see https://github.com/helm/helm/issues/1193).

$ helm list "triangular-deer"
REVISION        UPDATED                         STATUS  CHART           DESCRIPTION                                                 
1               Mon Mar  4 10:04:13 2019        FAILED  mysql-0.15.0    Upgrade "triangular-deer" failed...
$ helm list --deployed "triangular-deer"

$ helm upgrade --install --wait "triangular-deer" stable/mysql
Error: UPGRADE FAILED: "triangular-deer" has no deployed releases

It does this by adding the --force paramater to the helm upgrade statements if the release exists [[ -n "$(helm list "^$name$")" ]] and if the release does not have any successful deployments [[ -z "$(helm list --deployed "^$name$")" ]].

Note: Helm 3.x and https://github.com/helm/helm/pull/4871 address this issue. The PR has a tentative milestone for Helm 2.14.0

What are the relevant issue numbers?

Fixes #54760 (moved)

Does this MR meet the acceptance criteria?

Edited by Aaron Walker

Merge request reports