@@ -102,6 +102,7 @@ func main() {
102102 var webhookCertPath , webhookCertName , webhookCertKey string
103103 var enableLeaderElection bool
104104 var probeAddr string
105+ var pprofBindAddress string
105106 var secureMetrics bool
106107 var enableHTTP2 bool
107108 var tlsOpts []func (* tls.Config )
@@ -120,6 +121,7 @@ func main() {
120121 "The directory that contains the metrics server certificate." )
121122 flag .StringVar (& metricsCertName , "metrics-cert-name" , "tls.crt" , "The name of the metrics server certificate file." )
122123 flag .StringVar (& metricsCertKey , "metrics-cert-key" , "tls.key" , "The name of the metrics server key file." )
124+ flag .StringVar (& pprofBindAddress , "pprof-bind-address" , "" , "The address the pprof endpoint binds to. Set to empty to disable pprof." )
123125 flag .BoolVar (& enableHTTP2 , "enable-http2" , false ,
124126 "If set, HTTP/2 will be enabled for the metrics and webhook servers" )
125127 opts := zap.Options {
@@ -235,6 +237,7 @@ func main() {
235237 Metrics : metricsServerOptions ,
236238 WebhookServer : webhookServer ,
237239 HealthProbeBindAddress : probeAddr ,
240+ PprofBindAddress : pprofBindAddress ,
238241 LeaderElection : enableLeaderElection ,
239242 LeaderElectionID : "fa1814a2.openstack.org" ,
240243 }
0 commit comments