mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #3199 from a-robinson/disk-size
Allow for easily specifying the type and size of minion disks on GCE.
This commit is contained in:
commit
c908fbe59e
@ -21,6 +21,8 @@ ZONE=${KUBE_GCE_ZONE:-us-central1-b}
|
||||
MASTER_SIZE=n1-standard-1
|
||||
MINION_SIZE=n1-standard-1
|
||||
NUM_MINIONS=${NUM_MINIONS:-4}
|
||||
MINION_DISK_TYPE=pd-standard
|
||||
MINION_DISK_SIZE=10GB
|
||||
# TODO(dchen1107): Filed an internal issue to create an alias
|
||||
# for containervm image, so that gcloud will expand this
|
||||
# to the latest supported image.
|
||||
|
@ -21,6 +21,8 @@ ZONE=${KUBE_GCE_ZONE:-us-central1-b}
|
||||
MASTER_SIZE=g1-small
|
||||
MINION_SIZE=g1-small
|
||||
NUM_MINIONS=${NUM_MINIONS:-2}
|
||||
MINION_DISK_TYPE=pd-standard
|
||||
MINION_DISK_SIZE=10GB
|
||||
# TODO(dchen1107): Filed an internal issue to create an alias
|
||||
# for containervm image, so that gcloud will expand this
|
||||
# to the latest supported image.
|
||||
|
@ -296,7 +296,7 @@ function create-route {
|
||||
# $1: The name of the instance.
|
||||
# $2: The scopes flag.
|
||||
# $3: The minion start script.
|
||||
function create-instance {
|
||||
function create-minion {
|
||||
detect-project
|
||||
local attempt=0
|
||||
while true; do
|
||||
@ -304,6 +304,8 @@ function create-instance {
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--machine-type "${MINION_SIZE}" \
|
||||
--boot-disk-type "${MINION_DISK_TYPE}" \
|
||||
--boot-disk-size "${MINION_DISK_SIZE}" \
|
||||
--image-project="${IMAGE_PROJECT}" \
|
||||
--image "${IMAGE}" \
|
||||
--tags "${MINION_TAG}" \
|
||||
@ -466,7 +468,7 @@ function kube-up {
|
||||
) > "${KUBE_TEMP}/minion-start-${i}.sh"
|
||||
|
||||
local scopes_flag="${scope_flags[@]}"
|
||||
create-instance "${MINION_NAMES[$i]}" "${scopes_flag}" "startup-script=${KUBE_TEMP}/minion-start-${i}.sh" &
|
||||
create-minion "${MINION_NAMES[$i]}" "${scopes_flag}" "startup-script=${KUBE_TEMP}/minion-start-${i}.sh" &
|
||||
|
||||
if [ $i -ne 0 ] && [ $((i%5)) -eq 0 ]; then
|
||||
echo Waiting for creation of a batch of instances at $i...
|
||||
|
Loading…
Reference in New Issue
Block a user