Skip to content
Snippets Groups Projects
Commit 6517d8c5 authored by Roman Pertl's avatar Roman Pertl
Browse files

fix: allow stopping of failed and pending helm releases

parent d5d51dda
No related branches found
No related tags found
1 merge request!203fix: allow stopping of failed and pending helm releases
......@@ -391,7 +391,7 @@ function scale() {
function delete_postgresql() {
local name="$POSTGRESQL_RELEASE_NAME"
if [[ -n "$(helm ls --namespace "$KUBE_NAMESPACE" -q -f "^$name$")" ]]; then
if [[ -n "$(helm ls --namespace "$KUBE_NAMESPACE" -q -f "^$name$" --failed --pending --deployed)" ]]; then
helm delete "$name" --namespace "$KUBE_NAMESPACE"
kubectl delete pvc -n "$KUBE_NAMESPACE" -l "release=$POSTGRESQL_RELEASE_NAME"
fi
......@@ -403,7 +403,7 @@ function delete() {
local name
name=$(deploy_name "$track")
if [[ -n "$(helm ls --namespace "$KUBE_NAMESPACE" -q -f "^$name$")" ]]; then
if [[ -n "$(helm ls --namespace "$KUBE_NAMESPACE" -q -f "^$name$" --failed --pending --deployed)" ]]; then
helm delete "$name" --namespace "$KUBE_NAMESPACE"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment