Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Add delete confirmation and warning (#31)
Browse files Browse the repository at this point in the history
* Update delete-yatai.sh

* Update delete-yatai.sh
  • Loading branch information
parano authored Apr 6, 2022
1 parent 129bb00 commit 7069973
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions delete-yatai.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
#!/bin/bash

# Use helm to remove yatai installation
echo -e "\033[01;31mWarning: this will permanently delete all Yatai resources, existing model deployments, and in-cluster minio, postgresql DB data. Note that external DB and blob storage will not be deleted.\033[00m"
read -p "Are you sure to delete Yatai in cluster '$(kubectl config current-context)'? [y/n] " -n 1 -r
echo # move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
fi

echo "Uninstalling yatai helm chart from cluster.."
helm uninstall yatai -n yatai-system

# Remove additional yatai related namespaces
echo "Removing additional yatai related namespaces and resources.."
kubectl delete namespace yatai-components
kubectl delete namespace yatai-operators
kubectl delete namespace yatai-builders
kubectl delete namespace yatai

echo "Done"

0 comments on commit 7069973

Please sign in to comment.