@@ -102,6 +102,8 @@ func main() {
102102 var webhookCertPath , webhookCertName , webhookCertKey string
103103 var enableLeaderElection bool
104104 var probeAddr string
105+ var pprofBindAddress string
106+ var webhookPort int
105107 var secureMetrics bool
106108 var enableHTTP2 bool
107109 var tlsOpts []func (* tls.Config )
@@ -120,6 +122,8 @@ func main() {
120122 "The directory that contains the metrics server certificate." )
121123 flag .StringVar (& metricsCertName , "metrics-cert-name" , "tls.crt" , "The name of the metrics server certificate file." )
122124 flag .StringVar (& metricsCertKey , "metrics-cert-key" , "tls.key" , "The name of the metrics server key file." )
125+ flag .StringVar (& pprofBindAddress , "pprof-bind-address" , "" , "The address the pprof endpoint binds to. Set to empty to disable pprof." )
126+ flag .IntVar (& webhookPort , "webhook-bind-address" , 9443 , "The port the webhook server binds to." )
123127 flag .BoolVar (& enableHTTP2 , "enable-http2" , false ,
124128 "If set, HTTP/2 will be enabled for the metrics and webhook servers" )
125129 opts := zap.Options {
@@ -171,6 +175,7 @@ func main() {
171175 }
172176
173177 webhookServer := webhook .NewServer (webhook.Options {
178+ Port : webhookPort ,
174179 TLSOpts : webhookTLSOpts ,
175180 })
176181
@@ -235,6 +240,7 @@ func main() {
235240 Metrics : metricsServerOptions ,
236241 WebhookServer : webhookServer ,
237242 HealthProbeBindAddress : probeAddr ,
243+ PprofBindAddress : pprofBindAddress ,
238244 LeaderElection : enableLeaderElection ,
239245 LeaderElectionID : "fa1814a2.openstack.org" ,
240246 }
0 commit comments