X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F20-Monitoring%2Fbin%2Funinstall;h=f9ccccaaada5c661b328ecbbeae27d216d73994f;hb=4b108a720c1a5879b76c19d67f2ea38c5a4c18fc;hp=8a3ba1493d736eabf9a495358a0f1128911760c1;hpb=0309475769b27702c8c886411222882da8b519b1;p=it%2Fdep.git diff --git a/ric-infra/20-Monitoring/bin/uninstall b/ric-infra/20-Monitoring/bin/uninstall index 8a3ba149..f9ccccaa 100755 --- a/ric-infra/20-Monitoring/bin/uninstall +++ b/ric-infra/20-Monitoring/bin/uninstall @@ -15,27 +15,16 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ +COMPONENTS="elfkp" +echo "Undeploying RIC infra 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/elfkp.conf - -if [ -z "$RICAUX_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICAUX_RELEASE_NAME -fi - -RICAUX_COMPONENTS="elfkp" - -echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]" -echo "Helm Release Name: $RELEASE_NAME" - - -for component in $RICAUX_COMPONENTS; do - helm delete --purge "${RELEASE_NAME}-${component}" done