X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F50-RIC-Platform%2Fbin%2Funinstall;h=bad70194db99873419cdab281cb8486b22ac7852;hb=refs%2Fchanges%2F34%2F1234%2F9;hp=a5ccd8cd69286b6f91fcc2b010d2633e2a82319c;hpb=ad7f56d736f082b4882ca9be81ae40c27e240881;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index a5ccd8cd..bad70194 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -16,35 +16,16 @@ # limitations under the License. # ################################################################################ +COMPONENTS="appmgr rtmgr e2mgr e2term a1mediator submgr vespamgr jaegeradapter" +echo "Undeploying RIC platform components [$COMPONENTS]" -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +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 -source $DIR/../etc/ric.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 - - -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp" - -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