feat(manager): allow customization of the webhook port

This commit is contained in:
Zadkiel Aharonian
2023-03-04 11:58:32 +01:00
committed by Dario Tranchitella
parent 92b1debe6b
commit 010ed41ca7
+4 -1
View File
@@ -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",