From 34b9ed546c50f3b28ef4c2660e9f89e8d5ff2a0c Mon Sep 17 00:00:00 2001 From: Shashank Ram Date: Wed, 14 Oct 2020 10:12:38 -0700 Subject: [PATCH] demo: move mesh delete command into the cleanup script It is useful to run the cleanup script by itself. The mesh delete command must also be run to cleanup mesh resources created by install. This change moves the mesh delete command into the cleanup script so that this single cleanup script can be used to clean up all resources deployed by the demo. Signed-off-by: Shashank Ram --- demo/clean-kubernetes.sh | 2 ++ demo/run-osm-demo.sh | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/clean-kubernetes.sh b/demo/clean-kubernetes.sh index 09c3e1b921..b972a12ab3 100755 --- a/demo/clean-kubernetes.sh +++ b/demo/clean-kubernetes.sh @@ -5,6 +5,8 @@ set -aueo pipefail # shellcheck disable=SC1091 source .env +bin/osm mesh uninstall -f --mesh-name "$MESH_NAME" --namespace "$K8S_NAMESPACE" + for ns in "$BOOKWAREHOUSE_NAMESPACE" "$BOOKBUYER_NAMESPACE" "$BOOKSTORE_NAMESPACE" "$BOOKTHIEF_NAMESPACE" "$K8S_NAMESPACE"; do kubectl delete namespace "$ns" --ignore-not-found --wait & done diff --git a/demo/run-osm-demo.sh b/demo/run-osm-demo.sh index 6d91660db0..86a44ecad9 100755 --- a/demo/run-osm-demo.sh +++ b/demo/run-osm-demo.sh @@ -78,7 +78,6 @@ docker info > /dev/null || { echo "Docker daemon is not running"; exit 1; } make build-osm # cleanup stale resources from previous runs -bin/osm mesh uninstall -f --mesh-name "$MESH_NAME" --namespace "$K8S_NAMESPACE" ./demo/clean-kubernetes.sh # The demo uses osm's namespace as defined by environment variables, K8S_NAMESPACE