Skip to content

Commit

Permalink
fix: make webhook port configurable. (#2631)
Browse files Browse the repository at this point in the history
  • Loading branch information
xujunjie-cover committed Apr 11, 2023
1 parent c53d58d commit ddf28fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/webhook/server.go
Expand Up @@ -39,10 +39,9 @@ func init() {
}

func main() {
var port int
klog.Infof(versions.String())

port = *pflag.Int("port", 8443, "The port webhook listen on.")
port := pflag.Int("port", 8443, "The port webhook listen on.")

klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(klogFlags)
Expand All @@ -67,7 +66,7 @@ func main() {

// Create a webhook server.
hookServer := &ctrlwebhook.Server{
Port: port,
Port: *port,
CertDir: hookServerCertDir,
}

Expand Down

0 comments on commit ddf28fc

Please sign in to comment.