Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
89557110
Commit
89557110
authored
Mar 29, 2017
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't wait for first kubelet to be ready
and skip dummy deployment
parent
b4c71b1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
apiclient.go
cmd/kubeadm/app/master/apiclient.go
+2
-11
No files found.
cmd/kubeadm/app/master/apiclient.go
View file @
89557110
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment