Skip to content
Snippets Groups Projects

fix: allow stopping of failed and pending helm releases

All threads resolved!
+ 1
1
@@ -391,7 +391,7 @@ function scale() {
@@ -391,7 +391,7 @@ function scale() {
function delete_postgresql() {
function delete_postgresql() {
local name="$POSTGRESQL_RELEASE_NAME"
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"
helm delete "$name" --namespace "$KUBE_NAMESPACE"
kubectl delete pvc -n "$KUBE_NAMESPACE" -l "release=$POSTGRESQL_RELEASE_NAME"
kubectl delete pvc -n "$KUBE_NAMESPACE" -l "release=$POSTGRESQL_RELEASE_NAME"
fi
fi
Loading