Skip to content

Commit

Permalink
Merge pull request #4151 from vincepri/webhook-cert-dir
Browse files Browse the repository at this point in the history
✨ Add webhook-cert-dir flag
  • Loading branch information
k8s-ci-robot authored Oct 19, 2023
2 parents 925e7ad + b48d686 commit 2d51882
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var (
syncPeriod time.Duration
healthAddr string
webhookPort int
webhookCertDir string
reconcileTimeout time.Duration
enableTracing bool
)
Expand Down Expand Up @@ -221,9 +222,12 @@ func InitFlags(fs *pflag.FlagSet) {
fs.IntVar(&webhookPort,
"webhook-port",
9443,
"Webhook Server port, disabled by default. When enabled, the manager will only work as webhook server, no reconcilers are installed.",
"The webhook server port the manager will listen on.",
)

fs.StringVar(&webhookCertDir, "webhook-cert-dir", "/tmp/k8s-webhook-server/serving-certs/",
"The webhook certificate directory, where the server should find the TLS certificate and key.")

fs.DurationVar(&reconcileTimeout,
"reconcile-timeout",
reconciler.DefaultLoopTimeout,
Expand Down Expand Up @@ -289,7 +293,8 @@ func main() {
},
},
WebhookServer: webhook.NewServer(webhook.Options{
Port: webhookPort,
Port: webhookPort,
CertDir: webhookCertDir,
}),
EventBroadcaster: broadcaster,
})
Expand Down

0 comments on commit 2d51882

Please sign in to comment.