Commit eedc438d authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #28014 from jszczepkowski/kube-down-cleanup

Automatic merge from submit-queue Cleanup in kube-down: removed deletion of old autoscaler. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]() Cleanup in kube-down: removed deletion of old autoscaler.
parents 35c9e9f7 a745bb17
...@@ -953,17 +953,6 @@ function kube-down { ...@@ -953,17 +953,6 @@ function kube-down {
echo "Bringing down cluster" echo "Bringing down cluster"
set +e # Do not stop on error set +e # Do not stop on error
# Delete autoscaler for nodes if present. We assume that all or none instance groups have an autoscaler
local autoscaler
autoscaler=( $(gcloud compute instance-groups managed list \
--zone "${ZONE}" --project "${PROJECT}" --regexp="${NODE_INSTANCE_PREFIX}-.+" \
--format='value(autoscaled)') )
if [[ "${autoscaler:-}" == "yes" ]]; then
for group in ${INSTANCE_GROUPS[@]:-}; do
gcloud compute instance-groups managed stop-autoscaling "${group}" --zone "${ZONE}" --project "${PROJECT}"
done
fi
# Get the name of the managed instance group template before we delete the # Get the name of the managed instance group template before we delete the
# managed instance group. (The name of the managed instance group template may # managed instance group. (The name of the managed instance group template may
# change during a cluster upgrade.) # change during a cluster upgrade.)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment