X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=ric-infra%2F30-Kong%2Fbin%2Funinstall;h=b7ce8f36a5be8bbb2ec70d00931d40684d3a7e5c;hb=4b108a720c1a5879b76c19d67f2ea38c5a4c18fc;hp=01c97e06935640e448dbba7ac7c026536df12120;hpb=adbdd09e7300845d14107f67034d817286519a40;p=it%2Fdep.git diff --git a/ric-infra/30-Kong/bin/uninstall b/ric-infra/30-Kong/bin/uninstall index 01c97e06..b7ce8f36 100755 --- a/ric-infra/30-Kong/bin/uninstall +++ b/ric-infra/30-Kong/bin/uninstall @@ -19,31 +19,18 @@ -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +COMPONENTS="kong" -source $DIR/../etc/kong.conf +echo "Undeploying RIC infra components [$COMPONENTS]" -if [ -z "$RICINFRA_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICINFRA_RELEASE_NAME -fi -if [ -z "$RICINFRA_NAMESPACE" ];then - INFRA_NAMESPACE=$infra_namespace -else - INFRA_NAMESPACE=$RICINFRA_NAMESPACE -fi -RICINFRA_COMPONENTS="kong" +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 -echo "Undeploying RIC infra components [$RICINFRA_COMPONENTS]" -echo "Helm Release Name: $RELEASE_NAME" - - -for component in $RICINFRA_COMPONENTS; do - helm delete --purge "${RELEASE_NAME}-${component}" done -