Consolidate configurations to recipes. Add 5 second delay for Kong deployment due...
[it/dep.git] / ric-platform / 55-Ext-Services / bin / uninstall
index 751c157..67db3a9 100755 (executable)
 
 
 
+COMPONENTS="extsvcplt"
 
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+echo "Undeploying RIC platform components [$COMPONENTS]"
 
 
-source $DIR/../etc/ext.conf
 
-if [ -z "$RICPLT_RELEASE_NAME" ];then
-   RELEASE_NAME=$helm_release_name
-else
-   RELEASE_NAME=$RICPLT_RELEASE_NAME
-fi
-if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICPLT_NAMESPACE
-fi
+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
 
-RICPLT_COMPONENTS="extsvcplt"
-
-echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
-echo "Helm Release Name: $RELEASE_NAME"
-
-
-for component in $RICPLT_COMPONENTS; do
-  helm delete --purge  "${RELEASE_NAME}-$component" 
 done
+