@@ -82,6 +82,8 @@ func main() {
8282 var webhookCertPath , webhookCertName , webhookCertKey string
8383 var enableLeaderElection bool
8484 var probeAddr string
85+ var pprofBindAddress string
86+ var webhookPort int
8587 var secureMetrics bool
8688 var enableHTTP2 bool
8789 var tlsOpts []func (* tls.Config )
@@ -100,6 +102,8 @@ func main() {
100102 "The directory that contains the metrics server certificate." )
101103 flag .StringVar (& metricsCertName , "metrics-cert-name" , "tls.crt" , "The name of the metrics server certificate file." )
102104 flag .StringVar (& metricsCertKey , "metrics-cert-key" , "tls.key" , "The name of the metrics server key file." )
105+ flag .StringVar (& pprofBindAddress , "pprof-bind-address" , "" , "The address the pprof endpoint binds to. Set to empty to disable pprof." )
106+ flag .IntVar (& webhookPort , "webhook-bind-address" , 9443 , "The port the webhook server binds to." )
103107 flag .BoolVar (& enableHTTP2 , "enable-http2" , false ,
104108 "If set, HTTP/2 will be enabled for the metrics and webhook servers" )
105109 opts := zap.Options {
@@ -151,6 +155,7 @@ func main() {
151155 }
152156
153157 webhookServer := webhook .NewServer (webhook.Options {
158+ Port : webhookPort ,
154159 TLSOpts : webhookTLSOpts ,
155160 })
156161
@@ -215,6 +220,7 @@ func main() {
215220 Metrics : metricsServerOptions ,
216221 WebhookServer : webhookServer ,
217222 HealthProbeBindAddress : probeAddr ,
223+ PprofBindAddress : pprofBindAddress ,
218224 LeaderElection : enableLeaderElection ,
219225 LeaderElectionID : "83821f12.openstack.org" ,
220226 }
0 commit comments