Make bigger master root disks in GCE for large clusters

pull/6/head
gmarek 2016-05-16 15:57:56 +02:00
parent c20dcfc406
commit 64618c3311
4 changed files with 19 additions and 1 deletions

View File

@ -67,5 +67,6 @@ function create-master-instance() {
--metadata-from-file \
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/coreos/master.yaml,configure-node=${KUBE_ROOT}/cluster/gce/coreos/configure-node.sh,configure-kubelet=${KUBE_ROOT}/cluster/gce/coreos/configure-kubelet.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}" \
${preemptible_master}
}

View File

@ -54,6 +54,7 @@ function create-master-instance {
--metadata-from-file \
"startup-script=${KUBE_TEMP}/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}" \
${preemptible_master}
}

View File

@ -95,5 +95,6 @@ function create-master-instance {
--can-ip-forward \
--metadata-from-file \
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/trusty/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/trusty/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt${image_metadata}" \
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}"
}

View File

@ -624,6 +624,18 @@ function create-network() {
fi
}
# Assumes:
# NUM_NODES
# Sets:
# MASTER_ROOT_DISK_SIZE
function get-master-root-disk-size() {
if [ "$NUM_NODES" -le "1000"]; then
export MASTER_ROOT_DISK_SIZE="10"
else
export MASTER_ROOT_DISK_SIZE="50"
fi
}
function create-master() {
echo "Starting master and configuring firewalls"
gcloud compute firewall-rules create "${MASTER_NAME}-https" \
@ -667,6 +679,9 @@ function create-master() {
create-certs "${MASTER_RESERVED_IP}"
# Sets MASTER_ROOT_DISK_SIZE that is used by create-master-instance
get-master-root-disk-size
create-master-instance "${MASTER_RESERVED_IP}" &
}