Skip to content

Commit

Permalink
+++++4
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev committed Oct 30, 2023
1 parent 92fc9c4 commit e8a62ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions pkg/shell-operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
13 changes: 0 additions & 13 deletions pkg/shell-operator/metrics_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,13 @@ 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
// register scrape handler
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) {
Expand Down

0 comments on commit e8a62ce

Please sign in to comment.