Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase master disk size in large clusters #36486

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,18 @@ function get-master-root-disk-size() {
fi
}

# Assumes:
# NUM_NODES
# Sets:
# MASTER_DISK_SIZE
function get-master-disk-size() {
if [[ "${NUM_NODES}" -le "1000" ]]; then
export MASTER_DISK_SIZE="20GB"
else
export MASTER_DISK_SIZE="100GB"
fi
}

function create-master() {
echo "Starting master and configuring firewalls"
gcloud compute firewall-rules create "${MASTER_NAME}-https" \
Expand All @@ -739,6 +751,7 @@ function create-master() {

# We have to make sure the disk is created before creating the master VM, so
# run this in the foreground.
get-master-disk-size
gcloud compute disks create "${MASTER_NAME}-pd" \
--project "${PROJECT}" \
--zone "${ZONE}" \
Expand Down Expand Up @@ -846,6 +859,7 @@ function replicate-master() {

# We have to make sure the disk is created before creating the master VM, so
# run this in the foreground.
get-master-disk-size
gcloud compute disks create "${REPLICA_NAME}-pd" \
--project "${PROJECT}" \
--zone "${ZONE}" \
Expand Down