mirror of https://github.com/k3s-io/k3s
Make bigger master root disks in GCE for large clusters
parent
c20dcfc406
commit
64618c3311
|
@ -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}
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
|
@ -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}" &
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue