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 <ikreymer@gmail.com>
This commit is contained in:
parent
7cf2b11eb7
commit
ab76f0f394
14
btrix
14
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
|
||||
|
Loading…
Reference in New Issue
Block a user