mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Simplified while loops
This commit is contained in:
parent
8614a1774e
commit
3c3dbd19da
2 changed files with 22 additions and 12 deletions
|
@ -51,16 +51,22 @@ echo "$config" | kubectl --namespace=$NS create -f - || exit 1
|
|||
|
||||
# Wait until custom resources are available
|
||||
|
||||
response=$(kubectl get crd arangodeployments.database.arangodb.com --template="non-empty" --ignore-not-found)
|
||||
while [ -z $response ]; do
|
||||
sleep 1
|
||||
while :; do
|
||||
response=$(kubectl get crd arangodeployments.database.arangodb.com --template="non-empty" --ignore-not-found)
|
||||
echo -n .
|
||||
done
|
||||
response=$(kubectl get crd arangolocalstorages.storage.arangodb.com --template="non-empty" --ignore-not-found)
|
||||
while [ -z $response ]; do
|
||||
if [ ! -z $response ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
response=$(kubectl get crd arangolocalstorages.storage.arangodb.com --template="non-empty" --ignore-not-found)
|
||||
echo -n .
|
||||
done
|
||||
|
||||
while :; do
|
||||
response=$(kubectl get crd arangolocalstorages.storage.arangodb.com --template="non-empty" --ignore-not-found)
|
||||
if [ ! -z $response ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
echo -n .
|
||||
done
|
||||
|
||||
echo "Arango Operator deployed"
|
||||
|
|
|
@ -10,8 +10,12 @@ if [ -z $NS ]; then
|
|||
fi
|
||||
|
||||
kubectl delete namespace $NS --now --ignore-not-found
|
||||
response=$(kubectl get namespace $NS --template="non-empty" --ignore-not-found)
|
||||
while [ ! -z $response ]; do
|
||||
sleep 1
|
||||
response=$(kubectl get namespace $NS --template="non-empty" --ignore-not-found)
|
||||
|
||||
# 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
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue