mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-24 16:57:27 +00:00
Merge pull request #35526 from justinsb/fix_35521_b
Automatic merge from submit-queue kubelet bootstrap: start hostNetwork pods before we have PodCIDR Network readiness was checked in the pod admission phase, but pods that fail admission are not retried. Move the check to the pod start phase. Issue #35409 Issue #35521
This commit is contained in:
@@ -91,7 +91,6 @@ EOF
|
||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||
cbr-cidr: 10.123.45.0/29
|
||||
EOF
|
||||
else
|
||||
# If the kubelet is running disconnected from a master, give it a fixed
|
||||
@@ -110,7 +109,6 @@ salt-node-role() {
|
||||
grains:
|
||||
roles:
|
||||
- kubernetes-pool
|
||||
cbr-cidr: 10.123.45.0/29
|
||||
cloud: aws
|
||||
api_servers: '${API_SERVERS}'
|
||||
EOF
|
||||
|
||||
@@ -958,7 +958,6 @@ EOF
|
||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||
cbr-cidr: 10.123.45.0/29
|
||||
EOF
|
||||
else
|
||||
# If the kubelet is running disconnected from a master, give it a fixed
|
||||
@@ -977,7 +976,6 @@ function salt-node-role() {
|
||||
grains:
|
||||
roles:
|
||||
- kubernetes-pool
|
||||
cbr-cidr: 10.123.45.0/29
|
||||
cloud: gce
|
||||
api_servers: '${KUBERNETES_MASTER_NAME}'
|
||||
EOF
|
||||
|
||||
@@ -483,11 +483,8 @@ function start-kubelet {
|
||||
if [[ ! -z "${KUBELET_APISERVER:-}" && ! -z "${KUBELET_CERT:-}" && ! -z "${KUBELET_KEY:-}" ]]; then
|
||||
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
||||
flags+=" --register-schedulable=false"
|
||||
# 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"
|
||||
else
|
||||
# Standalone mode (not widely used?)
|
||||
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
||||
fi
|
||||
else # For nodes
|
||||
|
||||
@@ -155,7 +155,7 @@ assemble_kubelet_flags() {
|
||||
if [ ! -z "${KUBELET_APISERVER:-}" ] && \
|
||||
[ ! -z "${KUBELET_CERT:-}" ] && \
|
||||
[ ! -z "${KUBELET_KEY:-}" ]; then
|
||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false --pod-cidr=10.123.45.0/29"
|
||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false"
|
||||
else
|
||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --pod-cidr=${MASTER_IP_RANGE}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user