Skip to content

Commit 0bdc73b

Browse files
committed
Re-add --webhook-bind-address flag
Re-adds support for configuring the webhook server port through the --webhook-bind-address command-line flag (default: 9443). This flag was previously removed and needs to be restored to support local development and testing scenarios. Signed-off-by: Martin Schuppert <[email protected]>
1 parent 407d8d5 commit 0bdc73b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func main() {
8383
var enableLeaderElection bool
8484
var probeAddr string
8585
var pprofBindAddress string
86+
var webhookPort int
8687
var secureMetrics bool
8788
var enableHTTP2 bool
8889
var tlsOpts []func(*tls.Config)
@@ -102,6 +103,7 @@ func main() {
102103
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
103104
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
104105
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.")
105107
flag.BoolVar(&enableHTTP2, "enable-http2", false,
106108
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
107109
opts := zap.Options{
@@ -153,6 +155,7 @@ func main() {
153155
}
154156

155157
webhookServer := webhook.NewServer(webhook.Options{
158+
Port: webhookPort,
156159
TLSOpts: webhookTLSOpts,
157160
})
158161

0 commit comments

Comments
 (0)