Skip to content

Commit 83e5207

Browse files
author
corneredrat
committed
use consts
1 parent 92e63b5 commit 83e5207

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/healthchecker/types/types.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const (
4444
nodeEnvKey = "HOST_IP"
4545
kubeletPortKey = "KUBELET_PORT"
4646
kubeProxyPortKey = "KUBEPROXY_PORT"
47+
48+
defaultHostIP = "127.0.0.1"
49+
defaultKubeletPort = "10248"
50+
defaultKubeproxyPort = "10256"
4751
)
4852

4953
var (
@@ -58,9 +62,9 @@ func init() {
5862
func setKubeEndpoints() {
5963
var o string
6064

61-
hostIP := "127.0.0.1"
62-
kubeletPort := "10248"
63-
kubeProxyPort := "10256"
65+
hostIP := defaultHostIP
66+
kubeletPort := defaultKubeletPort
67+
kubeProxyPort := defaultKubeproxyPort
6468

6569
o = os.Getenv(nodeEnvKey)
6670
if o != "" {

0 commit comments

Comments
 (0)