From 2a6059124b38af8c8192a786719d552cc9b614a6 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Sun, 8 Dec 2024 23:25:13 -0600 Subject: [PATCH] remove pprof endpoints Signed-off-by: Ruben Vargas --- cmd/root/options.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/cmd/root/options.go b/cmd/root/options.go index 3eed656f5..ed2d667be 100644 --- a/cmd/root/options.go +++ b/cmd/root/options.go @@ -3,8 +3,6 @@ package root import ( "errors" "fmt" - "net/http" - "net/http/pprof" "os" "path/filepath" "reflect" @@ -65,22 +63,6 @@ func mergeOptionsFromFile(o manager.Options, cfg *configv1alpha1.ProjectConfig) if o.Metrics.BindAddress == "" && cfg.Metrics.BindAddress != "" { o.Metrics.BindAddress = cfg.Metrics.BindAddress - - endpoints := map[string]http.HandlerFunc{ - "/debug/pprof/": pprof.Index, - "/debug/pprof/cmdline": pprof.Cmdline, - "/debug/pprof/profile": pprof.Profile, - "/debug/pprof/symbol": pprof.Symbol, - "/debug/pprof/trace": pprof.Trace, - } - - if o.Metrics.ExtraHandlers == nil { - o.Metrics.ExtraHandlers = map[string]http.Handler{} - } - - for path, handler := range endpoints { - o.Metrics.ExtraHandlers[path] = handler - } } if o.HealthProbeBindAddress == "" && cfg.Health.HealthProbeBindAddress != "" {