Consolidate configurations to recipes. Add 5 second delay for Kong deployment due...
[it/dep.git] / ric-aux / 80-Auxiliary-Functions / bin / uninstall
index 85d3b5c..2f26691 100755 (executable)
 ################################################################################
 
 
+COMPONENTS="dashboard message-router ves mrsub"
 
+echo "Undeploying RIC aux components [$COMPONENTS]"
 
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
 
 
-source $DIR/../etc/aux.conf
+for component in $COMPONENTS; do
+    RELEASE_LIST=$(helm list | grep "$component" | awk '{print $1}')
+    if [ ! -z "$RELEASE_LIST" ];then
+        helm delete --purge $RELEASE_LIST
+    fi
 
-if [ -z "$RICAUX_RELEASE_NAME" ];then
-   RELEASE_NAME=$helm_release_name
-else
-   RELEASE_NAME=$RICAUX_RELEASE_NAME
-fi
-
-RICAUX_COMPONENTS="dashboard message-router ves mrsub"
-
-echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Helm Release Name: $RELEASE_NAME"
-
-
-
-for component in $RICAUX_COMPONENTS; do
-  helm delete --purge  "${RELEASE_NAME}-$component" 
 done