Code Review
/
it
/
dep.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Enabling helm3 & kubernetes 1.18 for RIC
[it/dep.git]
/
nonrtric
/
bin
/
uninstall
diff --git
a/nonrtric/bin/uninstall
b/nonrtric/bin/uninstall
index
4ace9fb
..
a986439
100755
(executable)
--- a/
nonrtric/bin/uninstall
+++ b/
nonrtric/bin/uninstall
@@
-32,7
+32,16
@@
RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}')
echo "Undeploying NONRTRIC components [$COMPONENTS]"
echo "Undeploying NONRTRIC components [$COMPONENTS]"
-helm delete --purge ${RELEASE_PREFIX}
+IS_HELM3=$(helm version -c --short|grep -e "^v3")
+HELM_FLAG=''
+if [ $IS_HELM3 ]
+then
+ HELM_FLAG=' -n '${NONRTRIC_NAMESPACE:-nonrtric}
+else
+ HELM_FLAG='--purge'
+fi
+
+helm delete ${HELM_FLAG} ${RELEASE_PREFIX}
kubectl delete cm -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe
kubectl delete cm -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe