Commit 50ca4f84 authored by Albert Salim's avatar Albert Salim

Check that helm deploy exists before deleting

This prevents `release: not found` error
while deleting
parent b928a9bd
......@@ -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}"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment