Allow creation of clusters larger than 500 nodes in GCE, take 2.

The change from the take 1 is to remove the suffix from the name of the
last MIG.
This commit is contained in:
gmarek
2015-12-11 09:09:09 +01:00
parent 0fba3e43d1
commit 2b6c78818b
2 changed files with 117 additions and 54 deletions

View File

@@ -174,6 +174,7 @@ function upgrade-nodes() {
#
# Vars set:
# SANITIZED_VERSION
# INSTANCE_GROUPS
# KUBELET_TOKEN
# KUBE_PROXY_TOKEN
# CA_CERT_BASE64
@@ -184,7 +185,7 @@ function prepare-node-upgrade() {
echo "== Preparing node upgrade (to ${KUBE_VERSION}). ==" >&2
SANITIZED_VERSION=$(echo ${KUBE_VERSION} | sed 's/[\.\+]/-/g')
detect-node-names
detect-node-names # sets INSTANCE_GROUPS
# TODO(zmerlynn): Refactor setting scope flags.
local scope_flags=
@@ -231,16 +232,18 @@ function do-node-upgrade() {
subgroup="alpha compute"
fi
local template_name=$(get-template-name-from-version ${SANITIZED_VERSION})
gcloud ${subgroup} rolling-updates \
--project="${PROJECT}" \
--zone="${ZONE}" \
start \
--group="${NODE_INSTANCE_PREFIX}-group" \
--template="${template_name}" \
--instance-startup-timeout=300s \
--max-num-concurrent-instances=1 \
--max-num-failed-instances=0 \
--min-instance-update-time=0s
for group in ${INSTANCE_GROUPS[@]}; do
gcloud ${subgroup} rolling-updates \
--project="${PROJECT}" \
--zone="${ZONE}" \
start \
--group="${group}" \
--template="${template_name}" \
--instance-startup-timeout=300s \
--max-num-concurrent-instances=1 \
--max-num-failed-instances=0 \
--min-instance-update-time=0s
done
# TODO(zmerlynn): Wait for the rolling-update to finish.