mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-28 21:55:48 +00:00
adding pods to MarkPodsNotReady parameters
This commit is contained in:
@@ -790,7 +790,12 @@ func (nc *Controller) monitorNodeHealth() error {
|
||||
// Report node event.
|
||||
if currentReadyCondition.Status != v1.ConditionTrue && observedReadyCondition.Status == v1.ConditionTrue {
|
||||
nodeutil.RecordNodeStatusChange(nc.recorder, node, "NodeNotReady")
|
||||
if err = nodeutil.MarkAllPodsNotReady(nc.kubeClient, node); err != nil {
|
||||
pods, err := listPodsFromNode(nc.kubeClient, node.Name)
|
||||
if err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("Unable to list pods from node %v: %v", node.Name, err))
|
||||
continue
|
||||
}
|
||||
if err = nodeutil.MarkPodsNotReady(nc.kubeClient, pods, node.Name); err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("Unable to mark all pods NotReady on node %v: %v", node.Name, err))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user