mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +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
|
||||
|
||||
# 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 \
|
||||
--project "${PROJECT}" \
|
||||
--quiet \
|
||||
--zone "${ZONE}" \
|
||||
"${REPLICA_NAME}"-pd
|
||||
"${replica-pd}"
|
||||
fi
|
||||
|
||||
# Delete disk for cluster registry if enabled
|
||||
|
Loading…
Reference in New Issue
Block a user