mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Allow CLUSTER_IP_RANGE/MINION_IP_RANGE to be overridden by KUBE_GCE_CLUSTER_CLASS_B
This commit is contained in:
parent
ba95c8a176
commit
68c9191cfc
@ -63,7 +63,7 @@ function increment_ipv4 {
|
||||
}
|
||||
|
||||
node_count="${NUM_MINIONS}"
|
||||
next_node="10.244.0.0"
|
||||
next_node="${KUBE_GCE_CLUSTER_CLASS_B:-10.244}.0.0"
|
||||
node_subnet_size=24
|
||||
node_subnet_count=$((2 ** (32-$node_subnet_size)))
|
||||
subnets=()
|
||||
@ -73,7 +73,7 @@ for ((node_num=0; node_num<node_count; node_num++)); do
|
||||
next_node=$(increment_ipv4 $next_node $node_subnet_count)
|
||||
done
|
||||
|
||||
CLUSTER_IP_RANGE="10.244.0.0/16"
|
||||
CLUSTER_IP_RANGE="${KUBE_GCE_CLUSTER_CLASS_B:-10.244}.0.0/16"
|
||||
MINION_IP_RANGES=($(eval echo "${subnets[@]}"))
|
||||
|
||||
MINION_SCOPES=("storage-ro" "compute-rw" "https://www.googleapis.com/auth/monitoring")
|
||||
|
@ -33,10 +33,9 @@ INSTANCE_PREFIX="${KUBE_GCE_INSTANCE_PREFIX:-e2e-test-${USER}}"
|
||||
MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
MINION_TAG="${INSTANCE_PREFIX}-minion"
|
||||
CLUSTER_IP_RANGE="10.245.0.0/16"
|
||||
MINION_IP_RANGES=($(eval echo "10.245.{1..${NUM_MINIONS}}.0/24"))
|
||||
CLUSTER_IP_RANGE="${KUBE_GCE_CLUSTER_CLASS_B:-10.245}.0.0/16"
|
||||
MINION_IP_RANGES=($(eval echo "${KUBE_GCE_CLUSTER_CLASS_B:-10.245}.{1..${NUM_MINIONS}}.0/24"))
|
||||
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
|
||||
MINION_SCOPES=("storage-ro" "compute-rw")
|
||||
# Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default.
|
||||
POLL_SLEEP_INTERVAL=3
|
||||
|
Loading…
Reference in New Issue
Block a user