mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Minion->Node rename: NODE_ROOT_DISK_SIZE, NODE_ROOT_DISK_TYPE, etc
NODE_SCOPES
This commit is contained in:
parent
fc04b55088
commit
1846cfc129
@ -66,13 +66,13 @@ MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20}
|
||||
MASTER_ROOT_DISK_TYPE="${MASTER_ROOT_DISK_TYPE:-gp2}"
|
||||
MASTER_ROOT_DISK_SIZE=${MASTER_ROOT_DISK_SIZE:-8}
|
||||
# The minions root EBS volume size (used to house Docker images)
|
||||
MINION_ROOT_DISK_TYPE="${MINION_ROOT_DISK_TYPE:-gp2}"
|
||||
MINION_ROOT_DISK_SIZE=${MINION_ROOT_DISK_SIZE:-32}
|
||||
NODE_ROOT_DISK_TYPE="${NODE_ROOT_DISK_TYPE:-gp2}"
|
||||
NODE_ROOT_DISK_SIZE=${NODE_ROOT_DISK_SIZE:-32}
|
||||
|
||||
MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
MINION_TAG="${INSTANCE_PREFIX}-minion"
|
||||
MINION_SCOPES=""
|
||||
NODE_SCOPES=""
|
||||
POLL_SLEEP_INTERVAL=3
|
||||
SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16" # formerly PORTAL_NET
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.244.0.0/16}"
|
||||
|
@ -64,13 +64,13 @@ MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20}
|
||||
MASTER_ROOT_DISK_TYPE="${MASTER_ROOT_DISK_TYPE:-gp2}"
|
||||
MASTER_ROOT_DISK_SIZE=${MASTER_ROOT_DISK_SIZE:-8}
|
||||
# The minions root EBS volume size (used to house Docker images)
|
||||
MINION_ROOT_DISK_TYPE="${MINION_ROOT_DISK_TYPE:-gp2}"
|
||||
MINION_ROOT_DISK_SIZE=${MINION_ROOT_DISK_SIZE:-32}
|
||||
NODE_ROOT_DISK_TYPE="${NODE_ROOT_DISK_TYPE:-gp2}"
|
||||
NODE_ROOT_DISK_SIZE=${NODE_ROOT_DISK_SIZE:-32}
|
||||
|
||||
MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
MINION_TAG="${INSTANCE_PREFIX}-minion"
|
||||
MINION_SCOPES=""
|
||||
NODE_SCOPES=""
|
||||
POLL_SLEEP_INTERVAL=3
|
||||
SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16" # formerly PORTAL_NET
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.245.0.0/16}"
|
||||
|
@ -86,7 +86,7 @@ MINION_SG_NAME="kubernetes-minion-${CLUSTER_ID}"
|
||||
# only affects the big storage instance types, which aren't a typical use case right now.
|
||||
BLOCK_DEVICE_MAPPINGS_BASE="{\"DeviceName\": \"/dev/sdc\",\"VirtualName\":\"ephemeral0\"},{\"DeviceName\": \"/dev/sdd\",\"VirtualName\":\"ephemeral1\"},{\"DeviceName\": \"/dev/sde\",\"VirtualName\":\"ephemeral2\"},{\"DeviceName\": \"/dev/sdf\",\"VirtualName\":\"ephemeral3\"}"
|
||||
MASTER_BLOCK_DEVICE_MAPPINGS="[{\"DeviceName\":\"/dev/sda1\",\"Ebs\":{\"DeleteOnTermination\":true,\"VolumeSize\":${MASTER_ROOT_DISK_SIZE},\"VolumeType\":\"${MASTER_ROOT_DISK_TYPE}\"}}, ${BLOCK_DEVICE_MAPPINGS_BASE}]"
|
||||
NODE_BLOCK_DEVICE_MAPPINGS="[{\"DeviceName\":\"/dev/sda1\",\"Ebs\":{\"DeleteOnTermination\":true,\"VolumeSize\":${MINION_ROOT_DISK_SIZE},\"VolumeType\":\"${MINION_ROOT_DISK_TYPE}\"}}, ${BLOCK_DEVICE_MAPPINGS_BASE}]"
|
||||
NODE_BLOCK_DEVICE_MAPPINGS="[{\"DeviceName\":\"/dev/sda1\",\"Ebs\":{\"DeleteOnTermination\":true,\"VolumeSize\":${NODE_ROOT_DISK_SIZE},\"VolumeType\":\"${NODE_ROOT_DISK_TYPE}\"}}, ${BLOCK_DEVICE_MAPPINGS_BASE}]"
|
||||
|
||||
# TODO (bburns) Parameterize this for multiple cluster per project
|
||||
|
||||
|
@ -43,7 +43,7 @@ MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
MINION_TAG="${INSTANCE_PREFIX}-minion"
|
||||
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.244.0.0/16}"
|
||||
MINION_SCOPES="${MINION_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
|
||||
# Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default.
|
||||
POLL_SLEEP_INTERVAL="${POLL_SLEEP_INTERVAL:-3}"
|
||||
|
@ -44,7 +44,7 @@ MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
MINION_TAG="${INSTANCE_PREFIX}-minion"
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.245.0.0/16}"
|
||||
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
MINION_SCOPES="${MINION_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
|
||||
TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
|
||||
|
||||
|
@ -145,7 +145,7 @@ function get-env-val() {
|
||||
|
||||
# Assumed vars:
|
||||
# KUBE_VERSION
|
||||
# MINION_SCOPES
|
||||
# NODE_SCOPES
|
||||
# NODE_INSTANCE_PREFIX
|
||||
# PROJECT
|
||||
# ZONE
|
||||
@ -167,7 +167,7 @@ function upgrade-nodes() {
|
||||
#
|
||||
# Assumed vars:
|
||||
# KUBE_VERSION
|
||||
# MINION_SCOPES
|
||||
# NODE_SCOPES
|
||||
# NODE_INSTANCE_PREFIX
|
||||
# PROJECT
|
||||
# ZONE
|
||||
@ -188,8 +188,8 @@ function prepare-node-upgrade() {
|
||||
|
||||
# TODO(zmerlynn): Refactor setting scope flags.
|
||||
local scope_flags=
|
||||
if [ -n "${MINION_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${MINION_SCOPES}"
|
||||
if [ -n "${NODE_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${NODE_SCOPES}"
|
||||
else
|
||||
scope_flags="--no-scopes"
|
||||
fi
|
||||
|
@ -663,8 +663,8 @@ function kube-up {
|
||||
|
||||
# TODO(zmerlynn): Refactor setting scope flags.
|
||||
local scope_flags=
|
||||
if [ -n "${MINION_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${MINION_SCOPES}"
|
||||
if [ -n "${NODE_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${NODE_SCOPES}"
|
||||
else
|
||||
scope_flags="--no-scopes"
|
||||
fi
|
||||
@ -1040,8 +1040,8 @@ function prepare-push() {
|
||||
|
||||
# TODO(zmerlynn): Refactor setting scope flags.
|
||||
local scope_flags=
|
||||
if [ -n "${MINION_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${MINION_SCOPES}"
|
||||
if [ -n "${NODE_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${NODE_SCOPES}"
|
||||
else
|
||||
scope_flags="--no-scopes"
|
||||
fi
|
||||
|
@ -27,7 +27,7 @@ FIREWALL_SSH="${FIREWALL_SSH:-${NETWORK}-allow-ssh}"
|
||||
GCLOUD="${GCLOUD:-gcloud}"
|
||||
CMD_GROUP="${CMD_GROUP:-}"
|
||||
GCLOUD_CONFIG_DIR="${GCLOUD_CONFIG_DIR:-${HOME}/.config/gcloud/kubernetes}"
|
||||
MINION_SCOPES="${MINION_SCOPES:-"compute-rw,storage-ro"}"
|
||||
NODE_SCOPES="${NODE_SCOPES:-"compute-rw,storage-ro"}"
|
||||
MACHINE_TYPE="${MACHINE_TYPE:-n1-standard-2}"
|
||||
|
||||
# WARNING: any new vars added here must correspond to options that can be
|
||||
|
@ -113,7 +113,7 @@ function verify-prereqs() {
|
||||
# ZONE
|
||||
# CLUSTER_API_VERSION (optional)
|
||||
# NUM_MINIONS
|
||||
# MINION_SCOPES
|
||||
# NODE_SCOPES
|
||||
# MACHINE_TYPE
|
||||
function kube-up() {
|
||||
echo "... in gke:kube-up()" >&2
|
||||
@ -145,7 +145,7 @@ function kube-up() {
|
||||
"--project=${PROJECT}"
|
||||
"--num-nodes=${NUM_MINIONS}"
|
||||
"--network=${NETWORK}"
|
||||
"--scopes=${MINION_SCOPES}"
|
||||
"--scopes=${NODE_SCOPES}"
|
||||
"--cluster-version=${CLUSTER_API_VERSION}"
|
||||
"--machine-type=${MACHINE_TYPE}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user