Skip to content

Commit 3b65bf9

Browse files
change the probe port name to make the language more generic
1 parent 1f93335 commit 3b65bf9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/oc/admin/router/router.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ const (
244244
defaultPorts = "80:80,443:443"
245245

246246
// Default stats and healthz port.
247-
defaultStatsPort = 1936
248-
defaultHealthzPort = defaultStatsPort
247+
defaultStatsPort = 1936
249248
)
250249

251250
// NewCmdRouter implements the OpenShift CLI router command.
@@ -441,16 +440,16 @@ func generateProbeConfigForRouter(path string, cfg *RouterConfig, ports []kapi.C
441440

442441
if cfg.Type == "haproxy-router" {
443442
probe = &kapi.Probe{}
444-
healthzPort := defaultHealthzPort
443+
probePort := defaultStatsPort
445444
if cfg.StatsPort > 0 {
446-
healthzPort = cfg.StatsPort
445+
probePort = cfg.StatsPort
447446
}
448447

449448
probe.Handler.HTTPGet = &kapi.HTTPGetAction{
450449
Path: path,
451450
Port: intstr.IntOrString{
452451
Type: intstr.Int,
453-
IntVal: int32(healthzPort),
452+
IntVal: int32(probePort),
454453
},
455454
}
456455

0 commit comments

Comments
 (0)