Make resize tests work on GKE

(cherry picked from commit abc4e53648)
This commit is contained in:
CJ Cullen
2015-06-09 11:49:40 -07:00
committed by Brendan Burns
parent 42106432a0
commit 0a3ff4fa28
3 changed files with 21 additions and 2 deletions

View File

@@ -249,6 +249,21 @@ function detect-minion-names {
echo "MINION_NAMES=${MINION_NAMES[*]}"
}
# Detect instance group name generated by gke
#
# Assumed vars:
# GCLOUD
# PROJECT
# ZONE
# CLUSTER_NAME
# Vars set:
# NODE_INSTANCE_GROUP
function detect-node-instance-group {
NODE_INSTANCE_GROUP=$("${GCLOUD}" alpha container clusters describe \
--project="${PROJECT}" --zone="${ZONE}" "${CLUSTER_NAME}" \
| grep instanceGroupManagers | cut -d '/' -f 11)
}
# SSH to a node by name ($1) and run a command ($2).
#
# Assumed vars: