Merge pull request #9832 from brendandburns/project

Add a missing ${PROJECT}
This commit is contained in:
Fabio Yeon 2015-06-15 19:35:32 -07:00
commit bb659de2f1

View File

@ -113,13 +113,14 @@ function prepare-upgrade() {
# #
# Assumed vars: # Assumed vars:
# MASTER_NAME # MASTER_NAME
# PROJECT
# ZONE # ZONE
# #
# Args: # Args:
# $1 env key to use # $1 env key to use
function get-env-val() { function get-env-val() {
# TODO(mbforbes): Make this more reliable with retries. # TODO(mbforbes): Make this more reliable with retries.
gcloud compute ssh --zone ${ZONE} ${MASTER_NAME} --command \ gcloud compute --project ${PROJECT} ssh --zone ${ZONE} ${MASTER_NAME} --command \
"curl --fail --silent -H 'Metadata-Flavor: Google' \ "curl --fail --silent -H 'Metadata-Flavor: Google' \
'http://metadata/computeMetadata/v1/instance/attributes/kube-env'" 2>/dev/null \ 'http://metadata/computeMetadata/v1/instance/attributes/kube-env'" 2>/dev/null \
| grep ${1} | cut -d : -f 2 | cut -d \' -f 2 | grep ${1} | cut -d : -f 2 | cut -d \' -f 2