@@ -12,6 +12,7 @@ import (
12
12
13
13
const (
14
14
flagMetricsBindAddr = "metrics-bind-addr"
15
+ flagHealthProbeBindAddr = "health-probe-bind-addr"
15
16
flagWebhookBindPort = "webhook-bind-port"
16
17
flagEnableLeaderElection = "enable-leader-election"
17
18
flagLeaderElectionID = "leader-election-id"
@@ -25,6 +26,7 @@ const (
25
26
defaultLeaderElectionNamespace = ""
26
27
defaultWatchNamespace = corev1 .NamespaceAll
27
28
defaultMetricsAddr = ":8080"
29
+ defaultHealthProbeBindAddress = ":61779"
28
30
defaultSyncPeriod = 60 * time .Minute
29
31
defaultWebhookBindPort = 9443
30
32
// High enough QPS to fit all expected use cases. QPS=0 is not set here, because
@@ -41,6 +43,7 @@ type RuntimeConfig struct {
41
43
KubeConfig string
42
44
WebhookBindPort int
43
45
MetricsBindAddress string
46
+ HealthProbeBindAddress string
44
47
EnableLeaderElection bool
45
48
LeaderElectionID string
46
49
LeaderElectionNamespace string
@@ -54,6 +57,8 @@ func (c *RuntimeConfig) BindFlags(fs *pflag.FlagSet) {
54
57
"Path to the kubeconfig file containing authorization and API server information." )
55
58
fs .StringVar (& c .MetricsBindAddress , flagMetricsBindAddr , defaultMetricsAddr ,
56
59
"The address the metric endpoint binds to." )
60
+ fs .StringVar (& c .HealthProbeBindAddress , flagHealthProbeBindAddr , defaultHealthProbeBindAddress ,
61
+ "The address the health probes binds to." )
57
62
fs .IntVar (& c .WebhookBindPort , flagWebhookBindPort , defaultWebhookBindPort ,
58
63
"The TCP port the Webhook server binds to." )
59
64
fs .BoolVar (& c .EnableLeaderElection , flagEnableLeaderElection , true ,
@@ -94,6 +99,7 @@ func BuildRuntimeOptions(rtCfg RuntimeConfig, scheme *runtime.Scheme) ctrl.Optio
94
99
Scheme : scheme ,
95
100
Port : rtCfg .WebhookBindPort ,
96
101
MetricsBindAddress : rtCfg .MetricsBindAddress ,
102
+ HealthProbeBindAddress : rtCfg .HealthProbeBindAddress ,
97
103
LeaderElection : rtCfg .EnableLeaderElection ,
98
104
LeaderElectionID : rtCfg .LeaderElectionID ,
99
105
LeaderElectionNamespace : rtCfg .LeaderElectionNamespace ,
0 commit comments