mirror of https://github.com/k3s-io/k3s
Only echo Waiting for kubelet every 30 seconds
Don't print a message every second while we are waiting for the kubelet to report Ready.pull/1756/head
parent
1d05e99769
commit
61ba9171ce
|
@ -159,10 +159,14 @@ func validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func configureNode(ctx context.Context, agentConfig *daemonconfig.Agent, nodes v1.NodeInterface) error {
|
func configureNode(ctx context.Context, agentConfig *daemonconfig.Agent, nodes v1.NodeInterface) error {
|
||||||
|
count := 0
|
||||||
for {
|
for {
|
||||||
node, err := nodes.Get(ctx, agentConfig.NodeName, metav1.GetOptions{})
|
node, err := nodes.Get(ctx, agentConfig.NodeName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Infof("Waiting for kubelet to be ready on node %s: %v", agentConfig.NodeName, err)
|
if count%30 == 0 {
|
||||||
|
logrus.Infof("Waiting for kubelet to be ready on node %s: %v", agentConfig.NodeName, err)
|
||||||
|
}
|
||||||
|
count++
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue