diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 75edc4b..ae1dd35 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -120,8 +120,8 @@ func main() { setupLog.Error(nil, "failed to set the registry URL as no address is provided") os.Exit(1) } + registryURL = fmt.Sprintf("%s://%s:%d", registryProtocol, registryAddr, registryPort) } - registryURL = fmt.Sprintf("%s://%s:%d", registryProtocol, registryAddr, registryPort) // if the enable-http2 flag is false (the default), http/2 should be disabled // due to its vulnerabilities. More specifically, disabling http/2 will @@ -235,7 +235,7 @@ func main() { ctx := ctrl.SetupSignalHandler() setupLog.Info("starting registry server", "RegistryURL", registryURL) - registryServer := registry.NewServer(registryAddr) + registryServer := registry.NewServer(fmt.Sprintf(":%d", registryPort)) go func() { if err := registryServer.Start(ctx); err != nil { setupLog.Error(err, "problem running registry server") diff --git a/internal/controller/server_controller.go b/internal/controller/server_controller.go index bb82f5d..56ec118 100644 --- a/internal/controller/server_controller.go +++ b/internal/controller/server_controller.go @@ -382,6 +382,7 @@ func (r *ServerReconciler) pxeBootServer(ctx context.Context, server *metalv1alp return fmt.Errorf("failed to set PXE boot one for server: %w", err) } + // TODO: do a proper restart if Server is already in PowerOn state if err := bmcClient.PowerOn(server.Spec.UUID); err != nil { return fmt.Errorf("failed to power on server: %w", err) }