Skip to content

Commit

Permalink
Fix registry start in manager (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler authored Apr 26, 2024
1 parent 9864be5 commit 8ad5c0d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,19 @@ func main() {
}

ctx := ctrl.SetupSignalHandler()
setupLog.Info("starting manager")
if err := mgr.Start(ctx); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}

setupLog.Info("starting registry server", "RegistryURL", registryURL)
registryServer := registry.NewServer(registryAddr)
if err := registryServer.Start(ctx); err != nil {
setupLog.Error(err, "problem running registry server")
go func() {
if err := registryServer.Start(ctx); err != nil {
setupLog.Error(err, "problem running registry server")
os.Exit(1)
}
}()

setupLog.Info("starting manager")
if err := mgr.Start(ctx); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}
}

0 comments on commit 8ad5c0d

Please sign in to comment.