adding pods to MarkPodsNotReady parameters

This commit is contained in:
Krzysztof Siedlecki
2019-10-02 14:22:58 +02:00
parent 8f48896709
commit a07a3a6878
3 changed files with 9 additions and 14 deletions

View File

@@ -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))
}
}