Revert "Avoid hard-coding list of Node Conditions"

This reverts commit 511b2eca.
parent 4dba8db4
...@@ -507,22 +507,15 @@ func getNodeConditionPredicate() cache.NodeConditionPredicate { ...@@ -507,22 +507,15 @@ func getNodeConditionPredicate() cache.NodeConditionPredicate {
// - NodeReady condition status is ConditionTrue, // - NodeReady condition status is ConditionTrue,
// - NodeOutOfDisk condition status is ConditionFalse, // - NodeOutOfDisk condition status is ConditionFalse,
// - NodeNetworkUnavailable condition status is ConditionFalse. // - NodeNetworkUnavailable condition status is ConditionFalse.
switch cond.Type { if cond.Type == api.NodeReady && cond.Status != api.ConditionTrue {
case api.NodeReady: glog.V(4).Infof("Ignoring node %v with %v condition status %v", node.Name, cond.Type, cond.Status)
if cond.Status != api.ConditionTrue { return false
glog.V(4).Infof("Ignoring node %v with %v condition status %v", node.Name, cond.Type, cond.Status) } else if cond.Type == api.NodeOutOfDisk && cond.Status != api.ConditionFalse {
return false glog.V(4).Infof("Ignoring node %v with %v condition status %v", node.Name, cond.Type, cond.Status)
} return false
} else if cond.Type == api.NodeNetworkUnavailable && cond.Status != api.ConditionFalse {
case api.NodeMemoryPressure, api.NodeDiskPressure: glog.V(4).Infof("Ignoring node %v with %v condition status %v", node.Name, cond.Type, cond.Status)
// We don't block on "pressure" conditions; these are warnings, not errors! return false
default:
// We assume everything else is blocking if the condition is True or Unknown
if cond.Status != api.ConditionFalse {
glog.V(4).Infof("Ignoring node %v with %v condition status %v", node.Name, cond.Type, cond.Status)
return false
}
} }
} }
// Ignore nodes that are marked unschedulable // Ignore nodes that are marked unschedulable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment