mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
bump master cidr range from /30 to /29
This commit is contained in:
parent
fc466743a8
commit
879a2dcdbd
@ -91,7 +91,7 @@ EOF
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||||
cbr-cidr: 10.123.45.0/30
|
cbr-cidr: 10.123.45.0/29
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# If the kubelet is running disconnected from a master, give it a fixed
|
# If the kubelet is running disconnected from a master, give it a fixed
|
||||||
@ -110,7 +110,7 @@ salt-node-role() {
|
|||||||
grains:
|
grains:
|
||||||
roles:
|
roles:
|
||||||
- kubernetes-pool
|
- kubernetes-pool
|
||||||
cbr-cidr: 10.123.45.0/30
|
cbr-cidr: 10.123.45.0/29
|
||||||
cloud: aws
|
cloud: aws
|
||||||
api_servers: '${API_SERVERS}'
|
api_servers: '${API_SERVERS}'
|
||||||
EOF
|
EOF
|
||||||
|
@ -949,7 +949,7 @@ EOF
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||||
cbr-cidr: 10.123.45.0/30
|
cbr-cidr: 10.123.45.0/29
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# If the kubelet is running disconnected from a master, give it a fixed
|
# If the kubelet is running disconnected from a master, give it a fixed
|
||||||
@ -968,7 +968,7 @@ function salt-node-role() {
|
|||||||
grains:
|
grains:
|
||||||
roles:
|
roles:
|
||||||
- kubernetes-pool
|
- kubernetes-pool
|
||||||
cbr-cidr: 10.123.45.0/30
|
cbr-cidr: 10.123.45.0/29
|
||||||
cloud: gce
|
cloud: gce
|
||||||
api_servers: '${KUBERNETES_MASTER_NAME}'
|
api_servers: '${KUBERNETES_MASTER_NAME}'
|
||||||
EOF
|
EOF
|
||||||
|
@ -480,7 +480,10 @@ function start-kubelet {
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" && ! -z "${KUBELET_CERT:-}" && ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" && ! -z "${KUBELET_CERT:-}" && ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
||||||
flags+=" --register-schedulable=false"
|
flags+=" --register-schedulable=false"
|
||||||
flags+=" --pod-cidr=10.123.45.0/30"
|
# need at least a /29 pod cidr for now due to #32844
|
||||||
|
# TODO: determine if we still allow non-hostnetwork pods to run on master, clean up master pod setup
|
||||||
|
# WARNING: potential ip range collision with 10.123.45.0/29
|
||||||
|
flags+=" --pod-cidr=10.123.45.0/29"
|
||||||
reconcile_cidr="false"
|
reconcile_cidr="false"
|
||||||
else
|
else
|
||||||
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
||||||
|
@ -155,7 +155,7 @@ assemble_kubelet_flags() {
|
|||||||
if [ ! -z "${KUBELET_APISERVER:-}" ] && \
|
if [ ! -z "${KUBELET_APISERVER:-}" ] && \
|
||||||
[ ! -z "${KUBELET_CERT:-}" ] && \
|
[ ! -z "${KUBELET_CERT:-}" ] && \
|
||||||
[ ! -z "${KUBELET_KEY:-}" ]; then
|
[ ! -z "${KUBELET_KEY:-}" ]; then
|
||||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false --reconcile-cidr=false --pod-cidr=10.123.45.0/30"
|
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false --reconcile-cidr=false --pod-cidr=10.123.45.0/29"
|
||||||
else
|
else
|
||||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --pod-cidr=${MASTER_IP_RANGE}"
|
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --pod-cidr=${MASTER_IP_RANGE}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user