X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F55-Ext-Services%2Fbin%2Funinstall;h=67db3a99b2f5ada337d0bb94548bfe858f8470cf;hb=refs%2Ftags%2F0.0.1;hp=751c157e3c6925272996597efdca7443c720a764;hpb=b0d610ef0ba334c963cac6e2f3423657fda803dd;p=it%2Fdep.git diff --git a/ric-platform/55-Ext-Services/bin/uninstall b/ric-platform/55-Ext-Services/bin/uninstall index 751c157e..67db3a99 100755 --- a/ric-platform/55-Ext-Services/bin/uninstall +++ b/ric-platform/55-Ext-Services/bin/uninstall @@ -18,30 +18,17 @@ +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 +