Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKE: Create network if needed. #3297

Merged
merged 1 commit into from
Jan 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cluster/gke/config-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CLUSTER_API_VERSION="${CLUSTER_API_VERSION:-}"
# TODO(mbforbes): Actually plumb this through; this currently only works
# because we use the 'default' network by default.
NETWORK="${NETWORK:-default}"
NETWORK_RANGE="${NETWORK_RANGE:-10.240.0.0/16}"
GCLOUD="${GCLOUD:-gcloud}"
GCLOUD_CONFIG_DIR="${GCLOUD_CONFIG_DIR:-${HOME}/.config/gcloud/kubernetes}"
ENABLE_CLUSTER_DNS=false
Expand Down
8 changes: 8 additions & 0 deletions cluster/gke/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ function verify-prereqs() {
function kube-up() {
echo "... in kube-up()" >&2
detect-project >&2

# Make the specified network if we need to.
if ! gcloud compute networks describe "${NETWORK}" &>/dev/null; then
echo "Creating new network: ${NETWORK}" >&2
gcloud compute networks create "${NETWORK}" --range "${NETWORK_RANGE}"
fi

# Bring up the cluster.
"${GCLOUD}" preview container clusters create "${CLUSTER_NAME}" \
--zone="${ZONE}" \
--project="${PROJECT}" \
Expand Down