Skip to content

Commit

Permalink
async addonMgr.start
Browse files Browse the repository at this point in the history
Signed-off-by: Subbarao Meduri <[email protected]>
  • Loading branch information
subbarao-meduri committed Oct 19, 2023
1 parent e63bfa9 commit b1c1561
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ func Start(c client.Client, ingressCtlCrdExists bool) {
os.Exit(1)
}

err = addonMgr.Start(context.TODO())
if err != nil {
log.Error(err, "Failed to start addon manager")
os.Exit(1)
}
go func() {
ctx := context.TODO()
err = addonMgr.Start(ctx)
if err != nil {
log.Error(err, "Failed to start addon manager")
os.Exit(1)
}
<-ctx.Done()
}()

kubeClient, err := kubernetes.NewForConfig(ctrl.GetConfigOrDie())
if err != nil {
Expand Down

0 comments on commit b1c1561

Please sign in to comment.