|
83 | 83 |
|
84 | 84 | type config struct { |
85 | 85 | metricsAddr string |
| 86 | + pprofAddr string |
86 | 87 | certFile string |
87 | 88 | keyFile string |
88 | 89 | enableLeaderElection bool |
@@ -131,6 +132,7 @@ func init() { |
131 | 132 | //create flagset, the collection of flags for this command |
132 | 133 | flags := operatorControllerCmd.Flags() |
133 | 134 | flags.StringVar(&cfg.metricsAddr, "metrics-bind-address", "", "The address for the metrics endpoint. Requires tls-cert and tls-key. (Default: ':8443')") |
| 135 | + flags.StringVar(&cfg.pprofAddr, "pprof-bind-address", "0", "The address the pprof endpoint binds to. an empty string or 0 disables pprof") |
134 | 136 | flags.StringVar(&cfg.probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") |
135 | 137 | flags.StringVar(&cfg.catalogdCasDir, "catalogd-cas-dir", "", "The directory of TLS certificate authorities to use for verifying HTTPS connections to the Catalogd web service.") |
136 | 138 | flags.StringVar(&cfg.pullCasDir, "pull-cas-dir", "", "The directory of TLS certificate authorities to use for verifying HTTPS connections to image registries.") |
@@ -265,6 +267,7 @@ func run() error { |
265 | 267 | mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ |
266 | 268 | Scheme: scheme.Scheme, |
267 | 269 | Metrics: metricsServerOptions, |
| 270 | + PprofBindAddress: cfg.pprofAddr, |
268 | 271 | HealthProbeBindAddress: cfg.probeAddr, |
269 | 272 | LeaderElection: cfg.enableLeaderElection, |
270 | 273 | LeaderElectionID: "9c4404e7.operatorframework.io", |
|
0 commit comments