Skip to content

Commit 6fba33c

Browse files
committed
webhook server: use tlsconfig from the manager options
the webhook server should use the tlsconfig specified in the manager options, so users setting tls fields in the manager see their preference honoured not only for the metrics server but also for the webhook server. Core CAPI does this already, here: https://github.com/kubernetes-sigs/cluster-api/blob/55e16f424c0ed8d3739070125d4c32a036997465/main.go#L406
1 parent 5576642 commit 6fba33c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func main() {
9797
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
9898
pflag.Parse()
9999

100-
_, metricsOptions, err := flags.GetManagerOptions(managerOptions)
100+
tlsOptions, metricsOptions, err := flags.GetManagerOptions(managerOptions)
101101
if err != nil {
102102
setupLog.Error(err, "Unable to start manager: invalid flags")
103103
}
@@ -151,6 +151,7 @@ func main() {
151151
WebhookServer: webhook.NewServer(webhook.Options{
152152
Port: webhookPort,
153153
CertDir: webhookCertDir,
154+
TLSOpts: tlsOptions,
154155
}),
155156
HealthProbeBindAddress: healthAddr,
156157
EventBroadcaster: broadcaster,

0 commit comments

Comments
 (0)