X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F15-Chartmuseum%2Fbin%2Funinstall;h=82d57a78cc71de4c8628ec89028c488a18703939;hb=ca9b3ee64b3966fa1d20226b361b4f614434129e;hp=79ca2d7daa45f2657c3239c8d8c7f798e7ca2d43;hpb=1c4ca31af79d1b399ea506080b8b248cf514feb2;p=it%2Fdep.git diff --git a/ric-infra/15-Chartmuseum/bin/uninstall b/ric-infra/15-Chartmuseum/bin/uninstall index 79ca2d7d..82d57a78 100755 --- a/ric-infra/15-Chartmuseum/bin/uninstall +++ b/ric-infra/15-Chartmuseum/bin/uninstall @@ -16,26 +16,15 @@ # limitations under the License. # ################################################################################ +COMPONENTS="chartmuseum" +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/chartmuseum.conf - -if [ -z "$RICINFRA_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICINFRA_RELEASE_NAME -fi - -RICINFRA_COMPONENTS="chartmuseum" - -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