Skip to content

Commit

Permalink
log flags and start informers later
Browse files Browse the repository at this point in the history
  • Loading branch information
aojea committed May 26, 2024
1 parent 69cdee7 commit 8cfc822
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/kindnetd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func main() {
_ = flag.Set("logtostderr", "true")
flag.Parse()

klog.Infof("flags: %v", flag.Args())

hostname, err := nodeutil.GetHostname(hostnameOverride)
if err != nil {
panic(err.Error())
Expand Down Expand Up @@ -198,9 +200,6 @@ func main() {
}()
}

// main control loop
informersFactory.Start(ctx.Done())

// CNI config controller
go func() {
err := cni.New(hostname, clientset, nodeInformer, int(ipFamily)).Run(ctx, 1)
Expand All @@ -217,6 +216,9 @@ func main() {
}
}()

// main control loop
informersFactory.Start(ctx.Done())

select {
case <-signalCh:
klog.Infof("Exiting: received signal")
Expand Down

0 comments on commit 8cfc822

Please sign in to comment.