mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #9702 from brendandburns/e2e-fix
Aggressively delete a cluster template if it exists.
This commit is contained in:
commit
2c5d40a69e
@ -401,8 +401,11 @@ function create-node-template {
|
|||||||
# add retries. Just relying on a non-zero exit code doesn't
|
# add retries. Just relying on a non-zero exit code doesn't
|
||||||
# distinguish an ephemeral failed call from a "not-exists".
|
# distinguish an ephemeral failed call from a "not-exists".
|
||||||
if gcloud compute instance-templates describe "$1" --project "${PROJECT}" &>/dev/null; then
|
if gcloud compute instance-templates describe "$1" --project "${PROJECT}" &>/dev/null; then
|
||||||
echo "Instance template ${1} already exists; continuing." >&2
|
echo "Instance template ${1} already exists; deleting." >&2
|
||||||
return
|
if ! gcloud compute instance-templates delete "$1" --project "${PROJECT}" &>/dev/null; then
|
||||||
|
echo -e "${color_yellow}Failed to delete existing instance template${color_norm}" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local attempt=0
|
local attempt=0
|
||||||
|
Loading…
Reference in New Issue
Block a user