X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F40-Credential%2Fbin%2Funinstall;h=c45136f336454150bd475009b46e5e61048d1eda;hb=d683df86cf19b95116f60cb60b96c2f7fb271fd0;hp=c820c7f703cee57794ff5c30b357acf42217f0a7;hpb=6be690a94ce6d07750a9783f31f36f8ae3854703;p=it%2Fdep.git diff --git a/ric-infra/40-Credential/bin/uninstall b/ric-infra/40-Credential/bin/uninstall index c820c7f7..c45136f3 100755 --- a/ric-infra/40-Credential/bin/uninstall +++ b/ric-infra/40-Credential/bin/uninstall @@ -17,24 +17,15 @@ ################################################################################ -OVERRIDEYAML=$1 +COMPONENTS="credential" +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/credential.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 - -helm delete --purge "${RELEASE_NAME}-${NAMESPACE}-credential" - +done