mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
commit
4a1660be7c
@ -21,6 +21,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/health"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/health"
|
||||||
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HealthyMinionRegistry struct {
|
type HealthyMinionRegistry struct {
|
||||||
@ -50,7 +51,8 @@ func (h *HealthyMinionRegistry) List() (currentMinions []string, err error) {
|
|||||||
for _, minion := range list {
|
for _, minion := range list {
|
||||||
status, err := health.Check(h.makeMinionURL(minion), h.client)
|
status, err := health.Check(h.makeMinionURL(minion), h.client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
glog.Errorf("%s failed health check with error: %s", minion, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if status == health.Healthy {
|
if status == health.Healthy {
|
||||||
result = append(result, minion)
|
result = append(result, minion)
|
||||||
|
Loading…
Reference in New Issue
Block a user