aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/oneclick/deleteAll.bash
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2017-07-24 10:45:28 +0300
committerBorislav Glozman <Borislav.Glozman@amdocs.com>2017-08-03 13:05:45 +0000
commit5197e2e88144a536068fb75e912f91b20e39db2e (patch)
tree965bdfc496c5eef1286680996051afe8aba577c5 /kubernetes/oneclick/deleteAll.bash
parent097208524f1954a08e3c6d82d15bb4090678b2ed (diff)
[OOM-3] Docker credentials secret missing
Change-Id: I30df3cc11315b757a1d3e3da832681682a970825 Signed-off-by: Borislav Glozman <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes/oneclick/deleteAll.bash')
-rwxr-xr-xkubernetes/oneclick/deleteAll.bash23
1 files changed, 17 insertions, 6 deletions
diff --git a/kubernetes/oneclick/deleteAll.bash b/kubernetes/oneclick/deleteAll.bash
index 8d145f945a..3d54aa80ae 100755
--- a/kubernetes/oneclick/deleteAll.bash
+++ b/kubernetes/oneclick/deleteAll.bash
@@ -1,6 +1,19 @@
#!/bin/bash
+
+. $(dirname "$0")/setenv.bash
+
delete_namespace() {
- kubectl delete namespace $1-$2
+ _NS=$1-$2
+ kubectl delete namespace $_NS
+ printf "Waiting for namespace $_NS termination...\n"
+ while kubectl get namespaces $_NS > /dev/null 2>&1; do
+ sleep 2
+ done
+ printf "Namespace $_NS deleted.\n\n"
+}
+
+delete_registry_key() {
+ kubectl --namespace $1-$2 delete secret onap-docker-registry-key
}
delete_service() {
@@ -58,23 +71,21 @@ fi
if [[ ! -z "$APP" ]]; then
ONAP_APPS=($APP)
-else
- ONAP_APPS=('sdc' 'aai' 'mso' 'message-router' 'robot' 'vid' 'sdnc' 'portal' 'policy' 'appc')
fi
printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n"
for i in ${ONAP_APPS[@]}; do
+ # delete the deployments
+ /bin/bash $i.sh $NS $i 'delete'
+
if [[ "$INCL_SVC" == true ]]; then
printf "\nDeleting services **********\n"
delete_service $NS $i
delete_namespace $NS $i
fi
- # delete the deployments
- /bin/bash $i.sh $NS $i 'delete'
-
done