mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Node controller did not handle an error
This means if List() fails nodes are considered deleted (which is bad)
This commit is contained in:
parent
a927791293
commit
c1a40d803c
@ -211,6 +211,9 @@ func (nc *NodeController) getCondition(status *api.NodeStatus, conditionType api
|
||||
// not reachable for a long period of time.
|
||||
func (nc *NodeController) monitorNodeStatus() error {
|
||||
nodes, err := nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, node := range nodes.Items {
|
||||
if !nc.knownNodeSet.Has(node.Name) {
|
||||
glog.V(1).Infof("NodeController observed a new Node: %#v", node)
|
||||
|
Loading…
Reference in New Issue
Block a user