Delete target pools and forwarding rules in guestbook.sh, with -q

pull/6/head
Prashanth Balasubramanian 2015-03-10 11:53:59 -07:00
parent 1231e65829
commit 1ae44c3a78
1 changed files with 4 additions and 3 deletions

View File

@ -38,9 +38,10 @@ GUESTBOOK="${KUBE_ROOT}/examples/guestbook"
function teardown() {
${KUBECTL} stop -f "${GUESTBOOK}"
if [[ "${KUBERNETES_PROVIDER}" == "gce" ]]; then
gcloud compute forwarding-rules delete "${INSTANCE_PREFIX}-default-frontend" || true
gcloud compute target-pools delete "${INSTANCE_PREFIX}-default-frontend" || true
fi
local REGION=${ZONE%-*}
gcloud compute forwarding-rules delete -q --region ${REGION} "${INSTANCE_PREFIX}-default-frontend" || true
gcloud compute target-pools delete -q --region ${REGION} "${INSTANCE_PREFIX}-default-frontend" || true
fi
}
prepare-e2e