Merge pull request #89735 from rosti/kubeadm-fix-bootstrap-wait

kubeadm join: Properly wait for TLS bootstrapping
This commit is contained in:
Kubernetes Prow Robot 2020-04-06 11:19:48 -07:00 committed by GitHub
commit b984f59fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -204,7 +204,7 @@ func waitForTLSBootstrappedClient() error {
fmt.Println("[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...") fmt.Println("[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...")
// Loop on every falsy return. Return with an error if raised. Exit successfully if true is returned. // Loop on every falsy return. Return with an error if raised. Exit successfully if true is returned.
return wait.PollImmediate(kubeadmconstants.APICallRetryInterval, kubeadmconstants.TLSBootstrapTimeout, func() (bool, error) { return wait.PollImmediate(kubeadmconstants.TLSBootstrapRetryInterval, kubeadmconstants.TLSBootstrapTimeout, func() (bool, error) {
// Check that we can create a client set out of the kubelet kubeconfig. This ensures not // Check that we can create a client set out of the kubelet kubeconfig. This ensures not
// only that the kubeconfig file exists, but that other files required by it also exist (like // only that the kubeconfig file exists, but that other files required by it also exist (like
// client certificate and key) // client certificate and key)

View File

@ -182,7 +182,9 @@ const (
// PatchNodeTimeout specifies how long kubeadm should wait for applying the label and taint on the control-plane before timing out // PatchNodeTimeout specifies how long kubeadm should wait for applying the label and taint on the control-plane before timing out
PatchNodeTimeout = 2 * time.Minute PatchNodeTimeout = 2 * time.Minute
// TLSBootstrapTimeout specifies how long kubeadm should wait for the kubelet to perform the TLS Bootstrap // TLSBootstrapTimeout specifies how long kubeadm should wait for the kubelet to perform the TLS Bootstrap
TLSBootstrapTimeout = 2 * time.Minute TLSBootstrapTimeout = 5 * time.Minute
// TLSBootstrapRetryInterval specifies how long kubeadm should wait before retrying the TLS Bootstrap check
TLSBootstrapRetryInterval = 5 * time.Second
// PullImageRetry specifies how many times ContainerRuntime retries when pulling image failed // PullImageRetry specifies how many times ContainerRuntime retries when pulling image failed
PullImageRetry = 5 PullImageRetry = 5
// PrepullImagesInParallelTimeout specifies how long kubeadm should wait for prepulling images in parallel before timing out // PrepullImagesInParallelTimeout specifies how long kubeadm should wait for prepulling images in parallel before timing out