From 68e7e18698d60050924c0f0e8f794a21820f2a1a Mon Sep 17 00:00:00 2001 From: Nick Sardo Date: Wed, 24 May 2017 10:23:08 -0700 Subject: [PATCH] Set NODE_SUBNETWORK env var in gce.conf --- cluster/gce/container-linux/configure-helper.sh | 5 +++++ cluster/gce/gci/configure-helper.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cluster/gce/container-linux/configure-helper.sh b/cluster/gce/container-linux/configure-helper.sh index 1e98e2a764..7263677fcd 100755 --- a/cluster/gce/container-linux/configure-helper.sh +++ b/cluster/gce/container-linux/configure-helper.sh @@ -184,6 +184,11 @@ token-body = ${TOKEN_BODY} project-id = ${PROJECT_ID} network-name = ${NODE_NETWORK} EOF + if [[ -n "${NODE_SUBNETWORK:-}" ]]; then + cat <>/etc/gce.conf +subnetwork-name = ${NODE_SUBNETWORK} +EOF + fi fi if [[ -n "${NODE_INSTANCE_PREFIX:-}" ]]; then use_cloud_config="true" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 261229486a..e6d2ef7b94 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -326,6 +326,11 @@ token-body = ${TOKEN_BODY} project-id = ${PROJECT_ID} network-name = ${NODE_NETWORK} EOF + if [[ -n "${NODE_SUBNETWORK:-}" ]]; then + cat <>/etc/gce.conf +subnetwork-name = ${NODE_SUBNETWORK} +EOF + fi fi if [[ -n "${NODE_INSTANCE_PREFIX:-}" ]]; then use_cloud_config="true"