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
Add release file for it-dep-iniit contaiiner
[it/dep.git]
/
ric-infra
/
30-Kong
/
bin
/
uninstall
diff --git
a/ric-infra/30-Kong/bin/uninstall
b/ric-infra/30-Kong/bin/uninstall
index
01c97e0
..
b7ce8f3
100755
(executable)
--- a/
ric-infra/30-Kong/bin/uninstall
+++ b/
ric-infra/30-Kong/bin/uninstall
@@
-19,31
+19,18
@@
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+COMPONENTS="kong"
-source $DIR/../etc/kong.conf
+echo "Undeploying RIC infra components [$COMPONENTS]"
-if [ -z "$RICINFRA_RELEASE_NAME" ];then
- RELEASE_NAME=$helm_release_name
-else
- RELEASE_NAME=$RICINFRA_RELEASE_NAME
-fi
-if [ -z "$RICINFRA_NAMESPACE" ];then
- INFRA_NAMESPACE=$infra_namespace
-else
- INFRA_NAMESPACE=$RICINFRA_NAMESPACE
-fi
-RICINFRA_COMPONENTS="kong"
+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
-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
done
-