fixed case where, no ready label is defined, but node is unscheduable (#1162)

* fixed case where, no ready label is defined, but node is unscheduable
This commit is contained in:
arminfelder
2020-10-28 09:33:52 +01:00
committed by GitHub
parent e97235aa39
commit 7730ecfdec
2 changed files with 42 additions and 12 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func (c *Controller) nodeUpdate(prev, cur interface{}) {
}
func (c *Controller) nodeIsReady(node *v1.Node) bool {
return (!node.Spec.Unschedulable || util.MapContains(node.Labels, c.opConfig.NodeReadinessLabel) ||
return (!node.Spec.Unschedulable || (len(c.opConfig.NodeReadinessLabel) > 0 && util.MapContains(node.Labels, c.opConfig.NodeReadinessLabel)) ||
util.MapContains(node.Labels, map[string]string{"master": "true"}))
}