diff options
Diffstat (limited to 'scripts/review_apps')
-rwxr-xr-x | scripts/review_apps/review-apps.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh index 862c3b4bb62..1a1cfbbd5f6 100755 --- a/scripts/review_apps/review-apps.sh +++ b/scripts/review_apps/review-apps.sh @@ -48,7 +48,13 @@ function delete_release() { return fi - helm_delete_release "${namespace}" "${release}" + # Check if helm release exists before attempting to delete + # There may be situation where k8s resources exist, but helm release does not, + # for example, following a failed helm install. + # In such cases, we still want to continue to clean up k8s resources. + if deploy_exists "${namespace}" "${release}"; then + helm_delete_release "${namespace}" "${release}" + fi kubectl_cleanup_release "${namespace}" "${release}" } |