diff --git a/pkg/shell-operator/bootstrap.go b/pkg/shell-operator/bootstrap.go index 0ff6ea46..c6d456ec 100644 --- a/pkg/shell-operator/bootstrap.go +++ b/pkg/shell-operator/bootstrap.go @@ -119,8 +119,6 @@ func (op *ShellOperator) assembleShellOperator(hooksDir string, tempDir string, op.RegisterDebugHookRoutes(debugServer) op.RegisterDebugConfigRoutes(debugServer, runtimeConfig) - registerShellOperatorMetrics(op.MetricStorage) - // Create webhookManagers with dependencies. op.setupHookManagers(hooksDir, tempDir) diff --git a/pkg/shell-operator/metrics_operator.go b/pkg/shell-operator/metrics_operator.go index 179ee14d..18e55c87 100644 --- a/pkg/shell-operator/metrics_operator.go +++ b/pkg/shell-operator/metrics_operator.go @@ -14,7 +14,6 @@ func (op *ShellOperator) setupMetricStorage(kubeEventsManagerLabels map[string]s registerCommonMetrics(metricStorage) registerTaskQueueMetrics(metricStorage) registerKubeEventsManagerMetrics(metricStorage, kubeEventsManagerLabels) - registerHookMetrics(metricStorage) op.APIServer.RegisterRoute(http.MethodGet, "/metrics", metricStorage.Handler().ServeHTTP) // create new metric storage for hooks @@ -22,18 +21,6 @@ func (op *ShellOperator) setupMetricStorage(kubeEventsManagerLabels map[string]s op.MetricStorage = metricStorage } -// registerShellOperatorMetrics register all metrics needed for the ShellOperator. -func registerShellOperatorMetrics(metricStorage *metric_storage.MetricStorage) { - registerCommonMetrics(metricStorage) - registerTaskQueueMetrics(metricStorage) - registerKubeEventsManagerMetrics(metricStorage, map[string]string{ - "hook": "", - "binding": "", - "queue": "", - }) - registerHookMetrics(metricStorage) -} - // registerCommonMetrics register base metric // This function is used in the addon-operator func registerCommonMetrics(metricStorage *metric_storage.MetricStorage) {