The source project of this merge request has been removed.
Force upgrade Helm releases missing a successful deployment
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?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Aaron Walker