mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue kubeadm: begin polling for bootstrap cluster info immediately **What this PR does / why we need it**: This PR changes the behavior of the `kubeadm` loop that polls the API server waiting for discovery information (`cluster-info`). The previous (inadvertent?) behavior was to sleep for `constants.DiscoveryRetryInterval` (5 seconds) before the first request ([`PollInfinite`](https://godoc.org/k8s.io/apimachinery/pkg/util/wait#PollInfinite) vs. [`PollImmediateInfinite`](https://godoc.org/k8s.io/apimachinery/pkg/util/wait#PollImmediateInfinite)). After this change, `kubeadm` begins does the first check immediately before it moves into the slower polling mode. This takes around 5 seconds off the average time for a new node to join. #### Before (~5.5s) ``` root@worker:~# time kubeadm join --token abc.123 192.168.42.10:6443 [...] real 0m5.523s user 0m0.112s sys 0m0.124s ``` #### After (~0.5s) ``` root@worker:~# time kubeadm join --token abc.123 192.168.42.10:6443 [...] real 0m0.587s user 0m0.092s sys 0m0.132s ``` **Which issue this PR fixes**: **Special notes for your reviewer**: This is my first Kubernetes PR, so please let me know if it's formatted correctly. **Release note**: ```release-note NONE ``` |
||
---|---|---|
.. | ||
clicheck | ||
cloud-controller-manager | ||
gendocs | ||
genkubedocs | ||
genman | ||
genslateyaml | ||
genswaggertypedocs | ||
genutils | ||
genyaml | ||
gke-certificates-controller | ||
hyperkube | ||
kube-apiserver | ||
kube-controller-manager | ||
kube-proxy | ||
kubeadm | ||
kubectl | ||
kubelet | ||
kubemark | ||
libs/go2idl | ||
linkcheck | ||
mungedocs | ||
BUILD | ||
OWNERS |