Skip to content

Commit

Permalink
Enable the profiling endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt authored and tpantelis committed Feb 8, 2024
1 parent b38a472 commit 6b86dac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ func init() {
func main() {
var enableLeaderElection bool
var probeAddr string
var pprofAddr string
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.StringVar(&pprofAddr, "pprof-bind-address", ":8082", "The address the profiling endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
Expand Down Expand Up @@ -173,7 +175,8 @@ func main() {
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{namespace: {}},
},
MapperProvider: apiutil.NewDynamicRESTMapper,
MapperProvider: apiutil.NewDynamicRESTMapper,
PprofBindAddress: pprofAddr,
})
if err != nil {
log.Error(err, "unable to start manager")
Expand Down

0 comments on commit 6b86dac

Please sign in to comment.