start prom server earlier in the virt-handler process so health check returns without EOF error
@@ -317,6 +317,9 @@ func (app *virtHandlerApp) Run() {
podIsolationDetector,
)
+ promErrCh := make(chan error)
+ go app.runPrometheusServer(promErrCh)
+
consoleHandler := rest.NewConsoleHandler(
podIsolationDetector,
vmiInformer,
@@ -362,8 +365,6 @@ func (app *virtHandlerApp) Run() {
go vmController.Run(10, stop)
errCh := make(chan error)
- promErrCh := make(chan error)
- go app.runPrometheusServer(promErrCh)
go app.runServer(errCh, consoleHandler, lifecycleHandler)
// wait for one of the servers to exit
