mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Detect whether a cluster exists before deleting it
This commit is contained in:
parent
d249236fa9
commit
a221e68c0c
@ -401,6 +401,8 @@ function test-teardown() {
|
|||||||
function kube-down() {
|
function kube-down() {
|
||||||
echo "... in gke:kube-down()" >&2
|
echo "... in gke:kube-down()" >&2
|
||||||
detect-project >&2
|
detect-project >&2
|
||||||
"${GCLOUD}" ${CMD_GROUP:-} container clusters delete --project="${PROJECT}" \
|
if "${GCLOUD}" ${CMD_GROUP:-} container clusters describe --project="${PROJECT}" --zone="${ZONE}" "${CLUSTER_NAME}" --quiet &>/dev/null; then
|
||||||
--zone="${ZONE}" "${CLUSTER_NAME}" --quiet
|
"${GCLOUD}" ${CMD_GROUP:-} container clusters delete --project="${PROJECT}" \
|
||||||
|
--zone="${ZONE}" "${CLUSTER_NAME}" --quiet
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user