Commit 09a9ea68 authored by Daniel Wang's avatar Daniel Wang

Add --image-type option to GKE kube-up

parent 22dfaef9
...@@ -30,6 +30,7 @@ CMD_GROUP="${CMD_GROUP:-}" ...@@ -30,6 +30,7 @@ CMD_GROUP="${CMD_GROUP:-}"
GCLOUD_CONFIG_DIR="${GCLOUD_CONFIG_DIR:-${HOME}/.config/gcloud/kubernetes}" GCLOUD_CONFIG_DIR="${GCLOUD_CONFIG_DIR:-${HOME}/.config/gcloud/kubernetes}"
NODE_SCOPES="${NODE_SCOPES:-"compute-rw,storage-ro"}" NODE_SCOPES="${NODE_SCOPES:-"compute-rw,storage-ro"}"
MACHINE_TYPE="${MACHINE_TYPE:-n1-standard-2}" MACHINE_TYPE="${MACHINE_TYPE:-n1-standard-2}"
IMAGE_TYPE="${IMAGE_TYPE:-}"
# WARNING: any new vars added here must correspond to options that can be # WARNING: any new vars added here must correspond to options that can be
# passed to `gcloud {CMD_GROUP} container clusters create`, or they will # passed to `gcloud {CMD_GROUP} container clusters create`, or they will
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
CLUSTER_NAME="${CLUSTER_NAME:-${USER}-gke-e2e}" CLUSTER_NAME="${CLUSTER_NAME:-${USER}-gke-e2e}"
NETWORK=${KUBE_GKE_NETWORK:-e2e} NETWORK=${KUBE_GKE_NETWORK:-e2e}
NODE_TAG="k8s-${CLUSTER_NAME}-node" NODE_TAG="k8s-${CLUSTER_NAME}-node"
IMAGE_TYPE="${KUBE_GKE_IMAGE_TYPE:-}"
# For ease of maintenance, extract any pieces that do not vary between default # For ease of maintenance, extract any pieces that do not vary between default
......
...@@ -172,6 +172,10 @@ function kube-up() { ...@@ -172,6 +172,10 @@ function kube-up() {
create_args+=("--cluster-ipv4-cidr=${CLUSTER_IP_RANGE}") create_args+=("--cluster-ipv4-cidr=${CLUSTER_IP_RANGE}")
fi fi
if [[ ! -z "${IMAGE_TYPE:-}" ]]; then
create_args+=("--image-type=${IMAGE_TYPE}")
fi
create_args+=( ${GKE_CREATE_FLAGS:-} ) create_args+=( ${GKE_CREATE_FLAGS:-} )
# Bring up the cluster. # Bring up the cluster.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment