1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00
kube-arangodb/scripts/kube_delete_namespace.sh

22 lines
381 B
Bash
Raw Normal View History

2018-02-20 09:58:28 +00:00
#!/bin/bash
# Delete a namespace and wait until it is gone
NS=$1
2018-02-20 17:17:13 +00:00
if [ -z $NS ]; then
echo "Specify a namespace argument"
exit 1
fi
2018-02-20 09:58:28 +00:00
kubectl delete namespace $NS --now --ignore-not-found
2018-03-09 09:46:07 +00:00
# Wait until its really gone
while :; do
response=$(kubectl get namespace $NS --template="non-empty" --ignore-not-found)
if [ -z $response ]; then
break
fi
sleep 0.5
2018-02-20 09:58:28 +00:00
done