X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F50-RIC-Platform%2Fbin%2Funinstall;fp=ric-platform%2F50-RIC-Platform%2Fbin%2Funinstall;h=f991eac0a5541f2a0a30a19a615498cd78d750af;hb=9c381477a3319e5dff968b1a4e8566c71499b3b6;hp=21a8e3fa3ab4e7d5d2f0b5adde620eb374146432;hpb=05175041bd4df59ed506224331a4bb246c1edf5e;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index 21a8e3fa..f991eac0 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -16,29 +16,16 @@ # limitations under the License. # ################################################################################ +COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr" +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 - -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr" - - -echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]" -echo "Helm Release Name: $RELEASE_NAME" - - - - -for component in $RICPLT_COMPONENTS; do - helm delete --purge "${RELEASE_NAME}-$component" done