From e83a73a363eaa2c0bbfd7129961e361c1c0328c3 Mon Sep 17 00:00:00 2001 From: Goutham Pratapa Date: Mon, 11 Sep 2023 16:37:27 +0530 Subject: [PATCH] fix cleanup of dps (#27159) --- scripts/cleanup_dp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cleanup_dp.sh b/scripts/cleanup_dp.sh index a4c6c8b02d..2a0977718f 100755 --- a/scripts/cleanup_dp.sh +++ b/scripts/cleanup_dp.sh @@ -39,10 +39,10 @@ for i in $deployed_charts echo $pr_state if [[ $pr_state == "MERGED" || $pr_state == "CLOSED" ]] then - helm uninstall $i -n $i mongosh "mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$i?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" --eval 'db.dropDatabase()' pod_name=$(kubectl get pods -n $i -o json | jq '.items[0].metadata.name' | tr -d '"') kubectl exec $pod_name -n $i -- bash -c "rm -rf /appsmith-stacks/*" + helm uninstall $i -n $i kubectl delete ns $i || true kubectl patch pv $i-appsmith -p '{"metadata":{"finalizers":null}}' || true kubectl delete pv $i-appsmith --grace-period=0 --force || true