mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Fixed #32366: wrong master pd name during kube-down.
Fixed #32366: wrong master pd name during kube-down.
This commit is contained in:
parent
8f4c0bbcb7
commit
529818c9c1
@ -1183,12 +1183,14 @@ function kube-down() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete the master replica pd (possibly leaked by kube-up if master create failed).
|
# Delete the master replica pd (possibly leaked by kube-up if master create failed).
|
||||||
if gcloud compute disks describe "${REPLICA_NAME}"-pd --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
|
# TODO(jszczepkowski): remove also possibly leaked replicas' pds
|
||||||
|
local -r replica-pd="${REPLICA_NAME:-${MASTER_NAME}}-pd"
|
||||||
|
if gcloud compute disks describe "${replica-pd}" --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
|
||||||
gcloud compute disks delete \
|
gcloud compute disks delete \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--quiet \
|
--quiet \
|
||||||
--zone "${ZONE}" \
|
--zone "${ZONE}" \
|
||||||
"${REPLICA_NAME}"-pd
|
"${replica-pd}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete disk for cluster registry if enabled
|
# Delete disk for cluster registry if enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user