Skip to content

Commit 42e6ab0

Browse files
stuggiopenshift-merge-bot[bot]
authored andcommitted
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 f158367 commit 42e6ab0

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
@@ -77,6 +77,7 @@ func main() {
7777
var enableLeaderElection bool
7878
var probeAddr string
7979
var pprofBindAddress string
80+
var webhookPort int
8081
var secureMetrics bool
8182
var enableHTTP2 bool
8283
var tlsOpts []func(*tls.Config)
@@ -96,6 +97,7 @@ func main() {
9697
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
9798
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
9899
flag.StringVar(&pprofBindAddress, "pprof-bind-address", "", "The address the pprof endpoint binds to. Set to empty to disable pprof.")
100+
flag.IntVar(&webhookPort, "webhook-bind-address", 9443, "The port the webhook server binds to.")
99101
flag.BoolVar(&enableHTTP2, "enable-http2", false,
100102
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
101103
opts := zap.Options{
@@ -147,6 +149,7 @@ func main() {
147149
}
148150

149151
webhookServer := webhook.NewServer(webhook.Options{
152+
Port: webhookPort,
150153
TLSOpts: webhookTLSOpts,
151154
})
152155

0 commit comments

Comments
 (0)