mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
Make AWS node sizes dynamic in the number of nodes.
This commit is contained in:
@@ -15,10 +15,33 @@
|
||||
# limitations under the License.
|
||||
|
||||
ZONE=${KUBE_AWS_ZONE:-us-west-2a}
|
||||
MASTER_SIZE=${MASTER_SIZE:-t2.micro}
|
||||
MINION_SIZE=${MINION_SIZE:-t2.micro}
|
||||
MASTER_SIZE=${MASTER_SIZE:-}
|
||||
MINION_SIZE=${MINION_SIZE:-}
|
||||
NUM_MINIONS=${NUM_MINIONS:-4}
|
||||
|
||||
# Dynamically set node sizes so that Heapster has enough space to run
|
||||
if [[ -z ${MINION_SIZE} ]]; then
|
||||
if (( ${NUM_MINIONS} < 50 )); then
|
||||
MINION_SIZE="t2.micro"
|
||||
elif (( ${NUM_MINIONS} < 150 )); then
|
||||
MINION_SIZE="t2.small"
|
||||
else
|
||||
MINION_SIZE="t2.medium"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Dynamically set the master size by the number of nodes, these are guesses
|
||||
# TODO: gather some data
|
||||
if [[ -z ${MASTER_SIZE} ]]; then
|
||||
if (( ${NUM_MINIONS} < 50 )); then
|
||||
MASTER_SIZE="t2.micro"
|
||||
elif (( ${NUM_MINIONS} < 150 )); then
|
||||
MASTER_SIZE="t2.small"
|
||||
else
|
||||
MASTER_SIZE="t2.medium"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Optional: Set AWS_S3_BUCKET to the name of an S3 bucket to use for uploading binaries
|
||||
# (otherwise a unique bucket name will be generated for you)
|
||||
# AWS_S3_BUCKET=kubernetes-artifacts
|
||||
|
Reference in New Issue
Block a user