Skip to content

Commit e1acc58

Browse files
committed
fix: add ClientCAName to webhook server options
1 parent f8ad0f8 commit e1acc58

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cmd/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ func main() {
6666
var probeAddr string
6767
var secureMetrics bool
6868
var enableHTTP2 bool
69-
var tlsOpts []func(*tls.Config)
7069
var configFile string
70+
var tlsOpts []func(*tls.Config)
71+
7172
flag.StringVar(&configFile, "config", "/etc/tensor-fusion/config.yaml", "Config file of tensor-fusion-operator")
7273
flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metrics endpoint binds to. "+
7374
"Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.")
@@ -103,9 +104,10 @@ func main() {
103104
}
104105

105106
webhookServer := webhook.NewServer(webhook.Options{
106-
CertName: "cert",
107-
KeyName: "key",
108-
TLSOpts: tlsOpts,
107+
CertName: "cert",
108+
KeyName: "key",
109+
ClientCAName: "ca",
110+
TLSOpts: tlsOpts,
109111
})
110112

111113
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.

0 commit comments

Comments
 (0)