From ab76f0f39469641e394b188189a1c196f05acd61 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Wed, 13 Sep 2023 01:27:09 -0400 Subject: [PATCH] Make improvements to reset command (#1160) * Make improvements to reset command - Removing running crawls and profile browsers - Delete cronjobs - Delete configmaps --------- Co-authored-by: Ilya Kreymer --- btrix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/btrix b/btrix index 7f6b7f23..925d9160 100755 --- a/btrix +++ b/btrix @@ -62,19 +62,31 @@ waitUntilReadyMicrok8s(){ } reset(){ + echo "Stopping all crawls & profile browsers" + kubectl delete cjs -n crawlers --all + kubectl delete pjs -n crawlers --all + echo "Uninstalling..." helm uninstall btrix echo "Deleting data..." kubectl delete pvc --all + kubectl delete cronjob -n crawlers --all + kubectl delete configmap -n crawlers -l btrix.crawlconfig } resetMicrok8s(){ + echo "Stopping all crawls & profile browsers" + microk8s kubectl delete cjs -n crawlers --all + microk8s kubectl delete pjs -n crawlers --all + echo "Uninstalling..." microk8s helm uninstall btrix echo "Deleting data..." microk8s kubectl delete pvc --all + microk8s kubectl delete cronjob -n crawlers --all + microk8s kubectl delete configmap -n crawlers -l btrix.crawlconfig } runTests() { @@ -123,7 +135,7 @@ fi if [[ $1 = "reset" ]]; then echo "Current context: $CONTEXT" - echo "Resetting k8s cluster will delete the database. Are you sure you want to do this?" + echo "Resetting k8s cluster will delete the database. All running crawls will first be canceled. Are you sure you want to do this?" if [[ "$(read -e -p '[y/N] > '; echo $REPLY)" == [Yy]* ]] ; then echo Continuing else