Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix registry port #24

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions internal/controller/server_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down