Merge pull request #56888 from porridge/limit-curl-get

Automatic merge from submit-queue (batch tested with PRs 57670, 56888). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Limit number of pods listed as master liveness check.

**What this PR does / why we need it**:

Another step in making #55686 less likely.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-12-28 11:03:28 -08:00 committed by GitHub
commit c7d52e27c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1532,7 +1532,7 @@ function check-cluster() {
-H "Authorization: Bearer ${KUBE_BEARER_TOKEN}" \
${secure} \
--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}))
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