diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index f18d85db46c..1eaf673a270 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -31,6 +31,7 @@ MASTER_DISK_TYPE=pd-ssd MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB} NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard} NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB} +NODE_LOCAL_SSDS=${NODE_LOCAL_SSDS:-0} REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true} PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false} PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false} diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index bcfdccb9c8f..581dee383bf 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -31,6 +31,7 @@ MASTER_DISK_TYPE=pd-ssd MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB} NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard} NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB} +NODE_LOCAL_SSDS=${NODE_LOCAL_SSDS:-0} REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true} KUBE_APISERVER_REQUEST_TIMEOUT=300 PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false} diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index d90ebc432a8..39b9e5bc76f 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -480,6 +480,12 @@ function create-node-template() { if [[ "${PREEMPTIBLE_NODE}" == "true" ]]; then preemptible_minions="--preemptible --maintenance-policy TERMINATE" fi + local local_ssds="" + if [ ! -z ${NODE_LOCAL_SSDS+x} ]; then + for i in $(seq ${NODE_LOCAL_SSDS}); do + local_ssds="$local_ssds--local-ssd=interface=SCSI " + done + fi while true; do echo "Attempt ${attempt} to create ${1}" >&2 if ! gcloud compute instance-templates create "$template_name" \ @@ -491,6 +497,7 @@ function create-node-template() { --image "${NODE_IMAGE}" \ --tags "${NODE_TAG}" \ --network "${NETWORK}" \ + ${local_ssds} \ ${preemptible_minions} \ $2 \ --can-ip-forward \