mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #34750 from ixdy/cleanup-network
Don't fail teardown if we can't delete the network
This commit is contained in:
commit
92ef912f64
@ -1362,7 +1362,7 @@ function kube-down() {
|
|||||||
"${NETWORK}-default-ssh" \
|
"${NETWORK}-default-ssh" \
|
||||||
"${NETWORK}-default-internal" # Pre-1.5 clusters
|
"${NETWORK}-default-internal" # Pre-1.5 clusters
|
||||||
if [[ "${KUBE_DELETE_NETWORK}" == "true" ]]; then
|
if [[ "${KUBE_DELETE_NETWORK}" == "true" ]]; then
|
||||||
delete-network
|
delete-network || true # might fail if there are leaked firewall rules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If there are no more remaining master replicas, we should update kubeconfig.
|
# 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
|
if ! "${GCLOUD}" compute networks delete --project "${PROJECT}" --quiet "${NETWORK}"; then
|
||||||
echo "Failed to delete network '${NETWORK}'. Listing firewall-rules:"
|
echo "Failed to delete network '${NETWORK}'. Listing firewall-rules:"
|
||||||
"${GCLOUD}" compute firewall-rules --project "${PROJECT}" list --filter="network=${NETWORK}"
|
"${GCLOUD}" compute firewall-rules --project "${PROJECT}" list --filter="network=${NETWORK}"
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user