diff --git a/main.go b/main.go index a7c30f9b0f..2ff5b00495 100644 --- a/main.go +++ b/main.go @@ -96,7 +96,6 @@ var ( defaultSyncPeriod = manager.DefaultSyncPeriod defaultLeaderElectionID = manager.DefaultLeaderElectionID defaultPodName = manager.DefaultPodName - defaultWebhookPort = manager.DefaultWebhookServiceContainerPort ) // InitFlags initializes the flags. @@ -199,11 +198,17 @@ func InitFlags(fs *pflag.FlagSet) { fs.IntVar(&clusterCacheTrackerClientBurst, "clustercachetracker-client-burst", 30, "Maximum number of queries that should be allowed in one burst from the cluster cache tracker clients to the Kubernetes API server of workload clusters.") - fs.IntVar(&webhookOpts.Port, "webhook-port", defaultWebhookPort, - "Webhook Server port") + fs.IntVar(&webhookOpts.Port, "webhook-port", 9443, + "Webhook Server port.") fs.StringVar(&webhookOpts.CertDir, "webhook-cert-dir", "/tmp/k8s-webhook-server/serving-certs/", - "Webhook cert dir, only used when webhook-port is specified.") + "Webhook cert dir.") + + fs.StringVar(&webhookOpts.CertName, "webhook-cert-name", "tls.crt", + "Webhook cert name.") + + fs.StringVar(&webhookOpts.KeyName, "webhook-key-name", "tls.key", + "Webhook key name.") fs.StringVar(&managerOpts.HealthProbeBindAddress, "health-addr", ":9440", "The address the health endpoint binds to.", diff --git a/pkg/manager/constants.go b/pkg/manager/constants.go index 69d5c55b97..d269cba885 100644 --- a/pkg/manager/constants.go +++ b/pkg/manager/constants.go @@ -22,10 +22,6 @@ import "time" const ( defaultPrefix = "capv-" - // DefaultWebhookServiceContainerPort is the default value for the eponymous - // manager option. - DefaultWebhookServiceContainerPort = 0 - // DefaultSyncPeriod is the default value for the eponymous // manager option. DefaultSyncPeriod = time.Minute * 10