X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2Fbin%2Funinstall;h=5c1834e3460b4afb2b259e91d7db1909edaf607e;hb=refs%2Fchanges%2F37%2F5237%2F3;hp=1c8751ba8648af5fe0036f861a5623e9fb23ae58;hpb=a72e0f1c2ae78ab9eadacf5e7b3df53998584a72;p=it%2Fdep.git diff --git a/ric-aux/bin/uninstall b/ric-aux/bin/uninstall index 1c8751ba..5c1834e3 100755 --- a/ric-aux/bin/uninstall +++ b/ric-aux/bin/uninstall @@ -34,9 +34,17 @@ RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') echo "Undeploying AUX components [$COMPONENTS]" +IS_HELM3=$(helm version -c --short|grep -e "^v3") +HELM_FLAG='' +if [ $IS_HELM3 ] +then + HELM_FLAG=' -n '${AUXNAMESPACE:-ricaux} +else + HELM_FLAG='--purge' +fi for component in $COMPONENTS; do - helm delete --purge ${RELEASE_PREFIX}-$component + helm delete ${HELM_FLAG} ${RELEASE_PREFIX}-$component done kubectl delete cm -n ${AUXNAMESPACE:-ricaux} ricaux-recipe