Commit 92ef912f authored by Matt Liggett's avatar Matt Liggett Committed by GitHub

Merge pull request #34750 from ixdy/cleanup-network

Don't fail teardown if we can't delete the network
parents a474b2b9 6b65d4a3
......@@ -1362,7 +1362,7 @@ function kube-down() {
"${NETWORK}-default-ssh" \
"${NETWORK}-default-internal" # Pre-1.5 clusters
if [[ "${KUBE_DELETE_NETWORK}" == "true" ]]; then
delete-network
delete-network || true # might fail if there are leaked firewall rules
fi
# If there are no more remaining master replicas, we should update kubeconfig.
......
......@@ -387,7 +387,6 @@ function test-teardown() {
if ! "${GCLOUD}" compute networks delete --project "${PROJECT}" --quiet "${NETWORK}"; then
echo "Failed to delete network '${NETWORK}'. Listing firewall-rules:"
"${GCLOUD}" compute firewall-rules --project "${PROJECT}" list --filter="network=${NETWORK}"
return 1
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment