mirror of https://github.com/k3s-io/k3s
commit
4760b287f9
|
@ -38,6 +38,7 @@ import (
|
|||
"github.com/GoogleCloudPlatform/kubernetes/pkg/auth/handlers"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/binding"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint"
|
||||
|
@ -422,8 +423,8 @@ func (m *Master) InstallSwaggerAPI() {
|
|||
|
||||
func (m *Master) getServersToValidate(c *Config) map[string]apiserver.Server {
|
||||
serversToValidate := map[string]apiserver.Server{
|
||||
"controller-manager": {Addr: "127.0.0.1", Port: 10252, Path: "/healthz"},
|
||||
"scheduler": {Addr: "127.0.0.1", Port: 10251, Path: "/healthz"},
|
||||
"controller-manager": {Addr: "127.0.0.1", Port: ports.ControllerManagerPort, Path: "/healthz"},
|
||||
"scheduler": {Addr: "127.0.0.1", Port: ports.SchedulerPort, Path: "/healthz"},
|
||||
}
|
||||
for ix, machine := range c.EtcdHelper.Client.GetCluster() {
|
||||
etcdUrl, err := url.Parse(machine)
|
||||
|
@ -452,7 +453,7 @@ func (m *Master) getServersToValidate(c *Config) map[string]apiserver.Server {
|
|||
glog.Errorf("Failed to list minions: %v", err)
|
||||
}
|
||||
for ix, node := range nodes.Items {
|
||||
serversToValidate[fmt.Sprintf("node-%d", ix)] = apiserver.Server{Addr: node.Name, Port: 10250, Path: "/healthz"}
|
||||
serversToValidate[fmt.Sprintf("node-%d", ix)] = apiserver.Server{Addr: node.Name, Port: ports.KubeletPort, Path: "/healthz"}
|
||||
}
|
||||
return serversToValidate
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue