@@ -28,7 +28,6 @@ import (
28
28
29
29
// this package shouldn't really depend on other k8s.io/kubernetes code
30
30
api "k8s.io/kubernetes/pkg/apis/core"
31
- "k8s.io/kubernetes/pkg/master/ports"
32
31
)
33
32
34
33
func addDefaultingFuncs (scheme * runtime.Scheme ) error {
@@ -51,7 +50,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura
51
50
// 2. If there is a value set, attempt to split it. If it's just a port (ie, ":1234"), default to 0.0.0.0 with that port
52
51
// 3. If splitting the value fails, check if the value is even a valid IP. If so, use that with the default port.
53
52
// Otherwise use the default bind address
54
- defaultBindAddress := net .JoinHostPort ("0.0.0.0" , strconv .Itoa (ports . InsecureSchedulerPort ))
53
+ defaultBindAddress := net .JoinHostPort ("0.0.0.0" , strconv .Itoa (config . DefaultInsecureSchedulerPort ))
55
54
if obj .HealthzBindAddress == nil {
56
55
obj .HealthzBindAddress = & defaultBindAddress
57
56
} else {
@@ -65,7 +64,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura
65
64
// Something went wrong splitting the host/port, could just be a missing port so check if the
66
65
// existing value is a valid IP address. If so, use that with the default scheduler port
67
66
if host := net .ParseIP (* obj .HealthzBindAddress ); host != nil {
68
- hostPort := net .JoinHostPort (* obj .HealthzBindAddress , strconv .Itoa (ports . InsecureSchedulerPort ))
67
+ hostPort := net .JoinHostPort (* obj .HealthzBindAddress , strconv .Itoa (config . DefaultInsecureSchedulerPort ))
69
68
obj .HealthzBindAddress = & hostPort
70
69
} else {
71
70
// TODO: in v1beta1 we should let this error instead of stomping with a default value
@@ -87,7 +86,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura
87
86
// Something went wrong splitting the host/port, could just be a missing port so check if the
88
87
// existing value is a valid IP address. If so, use that with the default scheduler port
89
88
if host := net .ParseIP (* obj .MetricsBindAddress ); host != nil {
90
- hostPort := net .JoinHostPort (* obj .MetricsBindAddress , strconv .Itoa (ports . InsecureSchedulerPort ))
89
+ hostPort := net .JoinHostPort (* obj .MetricsBindAddress , strconv .Itoa (config . DefaultInsecureSchedulerPort ))
91
90
obj .MetricsBindAddress = & hostPort
92
91
} else {
93
92
// TODO: in v1beta1 we should let this error instead of stomping with a default value
0 commit comments