Skip to content

Commit d458faa

Browse files
Merge pull request #651 from stuggi/operator_sdk_1.41.1_pprofBindAddress
Re-add --webhook-bind-address flag
2 parents 9e66190 + cec4022 commit d458faa

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
@@ -84,6 +84,7 @@ func main() {
8484
var enableLeaderElection bool
8585
var probeAddr string
8686
var pprofBindAddress string
87+
var webhookPort int
8788
var secureMetrics bool
8889
var enableHTTP2 bool
8990
var tlsOpts []func(*tls.Config)
@@ -103,6 +104,7 @@ func main() {
103104
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
104105
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
105106
flag.StringVar(&pprofBindAddress, "pprof-bind-address", "", "The address the pprof endpoint binds to. Set to empty to disable pprof.")
107+
flag.IntVar(&webhookPort, "webhook-bind-address", 9443, "The port the webhook server binds to.")
106108
flag.BoolVar(&enableHTTP2, "enable-http2", false,
107109
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
108110
opts := zap.Options{
@@ -154,6 +156,7 @@ func main() {
154156
}
155157

156158
webhookServer := webhook.NewServer(webhook.Options{
159+
Port: webhookPort,
157160
TLSOpts: webhookTLSOpts,
158161
})
159162

0 commit comments

Comments
 (0)