@@ -12,6 +12,7 @@ import (
1212
1313const (
1414 flagMetricsBindAddr = "metrics-bind-addr"
15+ flagHealthProbeBindAddr = "health-probe-bind-addr"
1516 flagWebhookBindPort = "webhook-bind-port"
1617 flagEnableLeaderElection = "enable-leader-election"
1718 flagLeaderElectionID = "leader-election-id"
@@ -25,6 +26,7 @@ const (
2526 defaultLeaderElectionNamespace = ""
2627 defaultWatchNamespace = corev1 .NamespaceAll
2728 defaultMetricsAddr = ":8080"
29+ defaultHealthProbeBindAddress = ":61779"
2830 defaultSyncPeriod = 60 * time .Minute
2931 defaultWebhookBindPort = 9443
3032 // High enough QPS to fit all expected use cases. QPS=0 is not set here, because
@@ -41,6 +43,7 @@ type RuntimeConfig struct {
4143 KubeConfig string
4244 WebhookBindPort int
4345 MetricsBindAddress string
46+ HealthProbeBindAddress string
4447 EnableLeaderElection bool
4548 LeaderElectionID string
4649 LeaderElectionNamespace string
@@ -54,6 +57,8 @@ func (c *RuntimeConfig) BindFlags(fs *pflag.FlagSet) {
5457 "Path to the kubeconfig file containing authorization and API server information." )
5558 fs .StringVar (& c .MetricsBindAddress , flagMetricsBindAddr , defaultMetricsAddr ,
5659 "The address the metric endpoint binds to." )
60+ fs .StringVar (& c .HealthProbeBindAddress , flagHealthProbeBindAddr , defaultHealthProbeBindAddress ,
61+ "The address the health probes binds to." )
5762 fs .IntVar (& c .WebhookBindPort , flagWebhookBindPort , defaultWebhookBindPort ,
5863 "The TCP port the Webhook server binds to." )
5964 fs .BoolVar (& c .EnableLeaderElection , flagEnableLeaderElection , true ,
@@ -94,6 +99,7 @@ func BuildRuntimeOptions(rtCfg RuntimeConfig, scheme *runtime.Scheme) ctrl.Optio
9499 Scheme : scheme ,
95100 Port : rtCfg .WebhookBindPort ,
96101 MetricsBindAddress : rtCfg .MetricsBindAddress ,
102+ HealthProbeBindAddress : rtCfg .HealthProbeBindAddress ,
97103 LeaderElection : rtCfg .EnableLeaderElection ,
98104 LeaderElectionID : rtCfg .LeaderElectionID ,
99105 LeaderElectionNamespace : rtCfg .LeaderElectionNamespace ,
0 commit comments