Skip to content

Commit

Permalink
Add metal3 integration enabled log line
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed May 23, 2024
1 parent 44b29b2 commit b48051c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {

ctx := ctrl.SetupSignalHandler()
connections := clusters.NewConnections(mgr.GetClient(), func() context.Context { return ctx })
err = (&management.MachineReconciler{
if err := (&management.MachineReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("management"),
WorkloadNodeControllers: map[string]*workload.NodeController{},
Expand All @@ -83,18 +83,17 @@ func main() {
return ctx
},
ClusterConnections: connections,
}).SetupWithManager(mgr)
if err != nil {
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create machine management controller")
os.Exit(1)
}

if metal3Integration {
err = (&metal3.MachineReconciler{
setupLog.Info("metal3 maintenance integration is enabled")
if err := (&metal3.MachineReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("metal3"),
}).SetupWithManager(mgr)
if err != nil {
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create machine metal3 controller")
os.Exit(1)
}
Expand Down

0 comments on commit b48051c

Please sign in to comment.