Skip to content

Commit 5f39a83

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 <mschuppert@redhat.com>
1 parent b33d142 commit 5f39a83

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func main() {
8080
var enableLeaderElection bool
8181
var probeAddr string
8282
var pprofBindAddress string
83+
var webhookPort int
8384
var secureMetrics bool
8485
var enableHTTP2 bool
8586
var tlsOpts []func(*tls.Config)
@@ -99,6 +100,7 @@ func main() {
99100
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
100101
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
101102
flag.StringVar(&pprofBindAddress, "pprof-bind-address", "", "The address the pprof endpoint binds to. Set to empty to disable pprof.")
103+
flag.IntVar(&webhookPort, "webhook-bind-address", 9443, "The port the webhook server binds to.")
102104
flag.BoolVar(&enableHTTP2, "enable-http2", false,
103105
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
104106
opts := zap.Options{
@@ -150,6 +152,7 @@ func main() {
150152
}
151153

152154
webhookServer := webhook.NewServer(webhook.Options{
155+
Port: webhookPort,
153156
TLSOpts: webhookTLSOpts,
154157
})
155158

0 commit comments

Comments
 (0)