mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Limit number of pods listed as master liveness check.
This commit is contained in:
parent
64ed037e68
commit
5a3c2d80aa
@ -1532,7 +1532,7 @@ function check-cluster() {
|
|||||||
-H "Authorization: Bearer ${KUBE_BEARER_TOKEN}" \
|
-H "Authorization: Bearer ${KUBE_BEARER_TOKEN}" \
|
||||||
${secure} \
|
${secure} \
|
||||||
--max-time 5 --fail \
|
--max-time 5 --fail \
|
||||||
"https://${KUBE_MASTER_IP}/api/v1/pods" > "${curl_out}" 2>&1; do
|
"https://${KUBE_MASTER_IP}/api/v1/pods?limit=100" > "${curl_out}" 2>&1; do
|
||||||
local elapsed=$(($(date +%s) - ${start_time}))
|
local elapsed=$(($(date +%s) - ${start_time}))
|
||||||
if [[ ${elapsed} -gt ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} ]]; then
|
if [[ ${elapsed} -gt ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} ]]; then
|
||||||
echo -e "${color_red}Cluster failed to initialize within ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} seconds.${color_norm}" >&2
|
echo -e "${color_red}Cluster failed to initialize within ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} seconds.${color_norm}" >&2
|
||||||
|
Loading…
Reference in New Issue
Block a user