Commit 89557110 authored by Mike Danese's avatar Mike Danese

don't wait for first kubelet to be ready

and skip dummy deployment
parent b4c71b1f
...@@ -44,7 +44,7 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) { ...@@ -44,7 +44,7 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) {
fmt.Println("[apiclient] Created API client, waiting for the control plane to become ready") fmt.Println("[apiclient] Created API client, waiting for the control plane to become ready")
WaitForAPI(client) WaitForAPI(client)
fmt.Println("[apiclient] Waiting for at least one node to register and become ready") fmt.Println("[apiclient] Waiting for at least one node to register")
start := time.Now() start := time.Now()
wait.PollInfinite(kubeadmconstants.APICallRetryInterval, func() (bool, error) { wait.PollInfinite(kubeadmconstants.APICallRetryInterval, func() (bool, error) {
nodeList, err := client.Nodes().List(metav1.ListOptions{}) nodeList, err := client.Nodes().List(metav1.ListOptions{})
...@@ -55,20 +55,11 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) { ...@@ -55,20 +55,11 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) {
if len(nodeList.Items) < 1 { if len(nodeList.Items) < 1 {
return false, nil return false, nil
} }
n := &nodeList.Items[0]
if !v1.IsNodeReady(n) {
fmt.Println("[apiclient] First node has registered, but is not ready yet")
return false, nil
}
fmt.Printf("[apiclient] First node is ready after %f seconds\n", time.Since(start).Seconds()) fmt.Printf("[apiclient] First node has registered after %f seconds\n", time.Since(start).Seconds())
return true, nil return true, nil
}) })
if err := createAndWaitForADummyDeployment(client); err != nil {
return nil, err
}
return client, nil return client, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment