File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,15 +27,16 @@ helm_update() {
2727 exit
2828 fi
2929
30- # If a previous helm operation was interrupted unexpectedly, set it to failed.
31- if [[ " ${STATUS} " =~ ^(pending-install| pending-upgrade| pending-rollback| uninstalling)$ ]]; then
30+ # If a previous helm operation was interrupted unexpectedly or release state is corrupted , set it to failed.
31+ if [[ " ${STATUS} " =~ ^(pending-install| pending-upgrade| pending-rollback| superseded | uninstalling)$ ]]; then
3232 echo Previous helm job was interrupted, updating status from ${STATUS} to failed
3333 echo " Resetting ${HELM} release status from '${STATUS} ' to 'failed'" >> ${TERM_LOG}
3434 ${HELM} set-status ${NAME} failed --namespace ${TARGET_NAMESPACE}
3535
3636 # Upgrades can be retried; install and rollback will be handled as failure below.
37+ # If release state is superseded, chart deployment might be correct, try an upgrade first.
3738 # If this upgrade also fails, retries of the job will handle that as failure due to the release state change.
38- if [[ " ${STATUS} " == " pending-upgrade" ]]; then
39+ if [[ " ${STATUS} " =~ ^( pending-upgrade| superseded)$ ]]; then
3940 echo " Retrying upgrade of ${HELM} chart" >> ${TERM_LOG}
4041 echo " Retrying upgrade of ${NAME} "
4142 shift 1
You can’t perform that action at this time.
0 commit comments