Skip to content

Commit

Permalink
Merge pull request #458 from Kuadrant/fix-extra-metrics-handler
Browse files Browse the repository at this point in the history
fix: extra metrics handler
  • Loading branch information
guicassolato authored Mar 5, 2024
2 parents aa46e55 + 74900ec commit 991b6eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,15 +416,15 @@ func setupTelemetryServices(opts telemetryOptions) {
}

func setupManager(options ctrl.Options) (ctrl.Manager, error) {
if options.Metrics.BindAddress != "0" {
options.Metrics.ExtraHandlers = map[string]http.Handler{"/server-metrics": promhttp.Handler()}
}

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)
if err != nil {
return nil, err
}

if options.Metrics.BindAddress != "0" {
options.Metrics.ExtraHandlers = map[string]http.Handler{"/server-metrics": promhttp.Handler()}
}

if options.HealthProbeBindAddress != "0" {
if err := mgr.AddHealthzCheck("ping", healthz.Ping); err != nil {
return nil, err
Expand Down

0 comments on commit 991b6eb

Please sign in to comment.