diff --git a/main.go b/main.go index f35de554..4a35637e 100644 --- a/main.go +++ b/main.go @@ -102,8 +102,11 @@ func main() { var metricsAddr, namespace, configurationName string + var webhookPort int + var goFlagSet goflag.FlagSet + flag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook server binds to.") flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") flag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ @@ -142,7 +145,7 @@ func main() { manager, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, - Port: 9443, + Port: webhookPort, LeaderElection: enableLeaderElection, LeaderElectionID: "42c733ea.clastix.capsule.io", HealthProbeBindAddress: ":10080",