From 009f62ebad7628e9d559a9e021bd367800124ba5 Mon Sep 17 00:00:00 2001 From: Shyam Jeedigunta Date: Tue, 5 Sep 2017 14:45:26 +0200 Subject: [PATCH] Make heapster VM creation work with IP aliases --- cluster/gce/util.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 6b51ba17b10..3a00d158a27 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1302,13 +1302,19 @@ function create-nodes() { # - IP_ALIAS_SUBNETWORK # - IP_ALIAS_SIZE function create-heapster-node() { + local gcloud="gcloud" + + if [[ "${ENABLE_IP_ALIASES:-}" == 'true' ]]; then + gcloud="gcloud beta" + fi + local network=$(make-gcloud-network-argument \ "${NETWORK}" "" \ "${ENABLE_IP_ALIASES:-}" \ "${IP_ALIAS_SUBNETWORK:-}" \ "${IP_ALIAS_SIZE:-}") - gcloud compute instances \ + ${gcloud} compute instances \ create "${NODE_INSTANCE_PREFIX}-heapster" \ --project "${PROJECT}" \ --zone "${ZONE}" \