Update wwctl upgrade to manage TLS configuration

Also fixed an omission for API configuration in wwctl upgrade.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-03-18 18:10:38 -06:00
parent 73a71abfe2
commit c211529689
7 changed files with 85 additions and 5 deletions

View File

@@ -122,8 +122,8 @@ func RunServer() error {
}
httpsHandler := configureRootHandler(apiHandler)
go func() {
wwlog.Info("Starting HTTPS service on port %d", conf.Warewulf.TlsPort)
if err := http.ListenAndServeTLS(":"+strconv.Itoa(conf.Warewulf.TlsPort), crt, key, httpsHandler); err != nil {
wwlog.Info("Starting HTTPS service on port %d", conf.Warewulf.TLSPort)
if err := http.ListenAndServeTLS(":"+strconv.Itoa(conf.Warewulf.TLSPort), crt, key, httpsHandler); err != nil {
errChan <- fmt.Errorf("could not start HTTPS service: %w", err)
}
}()