@@ -41,8 +41,6 @@ import (
41
41
"github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authorizer"
42
42
"github.com/GoogleCloudPlatform/kubernetes/pkg/auth/handlers"
43
43
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
44
- "github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
45
- "github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
46
44
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports"
47
45
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/componentstatus"
48
46
controlleretcd "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller/etcd"
@@ -465,7 +463,7 @@ func (m *Master) init(c *Config) {
465
463
"persistentVolumeClaims" : persistentVolumeClaimStorage ,
466
464
"persistentVolumeClaims/status" : persistentVolumeClaimStatusStorage ,
467
465
468
- "componentStatuses" : componentstatus .NewStorage (func () map [string ]apiserver.Server { return m .getServersToValidate (c , false ) }),
466
+ "componentStatuses" : componentstatus .NewStorage (func () map [string ]apiserver.Server { return m .getServersToValidate (c ) }),
469
467
}
470
468
471
469
apiVersions := []string {}
@@ -507,8 +505,6 @@ func (m *Master) init(c *Config) {
507
505
m .mux .HandleFunc ("/" , apiserver .IndexHandler (m .handlerContainer , m .muxHelper ))
508
506
}
509
507
510
- // TODO: This is now deprecated. Should be removed once client dependencies are gone.
511
- apiserver .InstallValidator (m .muxHelper , func () map [string ]apiserver.Server { return m .getServersToValidate (c , true ) })
512
508
if c .EnableLogsSupport {
513
509
apiserver .InstallLogsSupport (m .muxHelper )
514
510
}
@@ -637,7 +633,7 @@ func (m *Master) InstallSwaggerAPI() {
637
633
swagger .RegisterSwaggerService (swaggerConfig , m .handlerContainer )
638
634
}
639
635
640
- func (m * Master ) getServersToValidate (c * Config , includeNodes bool ) map [string ]apiserver.Server {
636
+ func (m * Master ) getServersToValidate (c * Config ) map [string ]apiserver.Server {
641
637
serversToValidate := map [string ]apiserver.Server {
642
638
"controller-manager" : {Addr : "127.0.0.1" , Port : ports .ControllerManagerPort , Path : "/healthz" },
643
639
"scheduler" : {Addr : "127.0.0.1" , Port : ports .SchedulerPort , Path : "/healthz" },
@@ -664,15 +660,6 @@ func (m *Master) getServersToValidate(c *Config, includeNodes bool) map[string]a
664
660
}
665
661
serversToValidate [fmt .Sprintf ("etcd-%d" , ix )] = apiserver.Server {Addr : addr , Port : port , Path : "/v2/keys/" }
666
662
}
667
- if includeNodes && m .nodeRegistry != nil {
668
- nodes , err := m .nodeRegistry .ListMinions (api .NewDefaultContext (), labels .Everything (), fields .Everything ())
669
- if err != nil {
670
- glog .Errorf ("Failed to list minions: %v" , err )
671
- }
672
- for ix , node := range nodes .Items {
673
- serversToValidate [fmt .Sprintf ("node-%d" , ix )] = apiserver.Server {Addr : node .Name , Port : ports .KubeletPort , Path : "/healthz" , EnableHTTPS : true }
674
- }
675
- }
676
663
return serversToValidate
677
664
}
678
665
0 commit comments