Consolidate configurations to recipes. Add 5 second delay for Kong deployment due...
[it/dep.git] / ric-infra / 15-Chartmuseum / bin / uninstall
index 79ca2d7..82d57a7 100755 (executable)
 #   limitations under the License.                                             #
 ################################################################################
 
+COMPONENTS="chartmuseum"
 
+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/chartmuseum.conf
-
-if [ -z "$RICINFRA_RELEASE_NAME" ];then
-   RELEASE_NAME=$helm_release_name
-else
-   RELEASE_NAME=$RICINFRA_RELEASE_NAME
-fi
-
-RICINFRA_COMPONENTS="chartmuseum"
-
-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