diff --git a/pkg/shell-operator/bootstrap.go b/pkg/shell-operator/bootstrap.go index 98d232ae..0ff6ea46 100644 --- a/pkg/shell-operator/bootstrap.go +++ b/pkg/shell-operator/bootstrap.go @@ -111,7 +111,9 @@ func (op *ShellOperator) AssembleCommonOperator(listenAddress, listenPort string // - kubernetes events manager // - schedule manager func (op *ShellOperator) assembleShellOperator(hooksDir string, tempDir string, debugServer *debug.Server, runtimeConfig *config.Config) (err error) { - registerDefaultRoutes(op) + registerRootRoute(op) + // for shell-operator only + registerHookMetrics(op.HookMetricStorage) op.RegisterDebugQueueRoutes(debugServer) op.RegisterDebugHookRoutes(debugServer) diff --git a/pkg/shell-operator/http_server.go b/pkg/shell-operator/http_server.go index 529279c2..2d145fad 100644 --- a/pkg/shell-operator/http_server.go +++ b/pkg/shell-operator/http_server.go @@ -109,7 +109,7 @@ func newBaseHTTPServer(address, port string) *baseHTTPServer { return srv } -func registerDefaultRoutes(op *ShellOperator) { +func registerRootRoute(op *ShellOperator) { op.APIServer.RegisterRoute(http.MethodGet, "/", func(writer http.ResponseWriter, request *http.Request) { _, _ = fmt.Fprintf(writer, `