X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=nonrtric%2Fbin%2Funinstall;h=4ace9fb553b8678b1b43a2e7de8f6021121bf4f4;hb=refs%2Fchanges%2F28%2F4128%2F3;hp=23d2fc3fcf4e67089c5dbf4636f72daa0b7808b2;hpb=ce3241c91902cd029c256d4ac9a3d0c80cbb0211;p=it%2Fdep.git diff --git a/nonrtric/bin/uninstall b/nonrtric/bin/uninstall index 23d2fc3f..4ace9fb5 100755 --- a/nonrtric/bin/uninstall +++ b/nonrtric/bin/uninstall @@ -16,7 +16,7 @@ ################################################################################ -COMPONENTS="a1simulator policymanagementservice" +COMPONENTS="controlpanel a1controller a1simulator policymanagementservice" RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}') kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml @@ -29,25 +29,10 @@ COMMON_BLOCK=$(cat /tmp/recipe.yaml | awk '/^common:/{getline; while ($0 ~ /^ +. NAMESPACE_BLOCK=$(cat /tmp/recipe.yaml | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') -SIMULATOR_BLOCK=$(cat /tmp/recipe.yaml | awk '/^ simulatorinstance:/{getline; while ($0 ~ /^ +.*|^ *$/) {print $0; if (getline == 0) {break}}}') -SIMULATOR_COUNT=$(echo "$SIMULATOR_BLOCK" | awk '/^ *count:/{print $2}') echo "Undeploying NONRTRIC components [$COMPONENTS]" - -for component in $COMPONENTS; do - case "$component" in - a1simulator) - for((i=1;i<=$SIMULATOR_COUNT;i++)) ; do - echo "Undeploying SIMUALATOR INSTANCE $i" - helm delete --purge ${RELEASE_PREFIX}-$component-$i - done - ;; - *) - helm delete --purge ${RELEASE_PREFIX}-$component - - esac -done +helm delete --purge ${RELEASE_PREFIX} kubectl delete cm -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe