adapt zones check in spread constraint plugin
check Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
This commit is contained in:
parent
5e8a765fe0
commit
54b66e8b5d
|
@ -41,8 +41,8 @@ func (p *SpreadConstraint) Filter(
|
||||||
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have provider property")
|
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have provider property")
|
||||||
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldRegion && cluster.Spec.Region == "" {
|
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldRegion && cluster.Spec.Region == "" {
|
||||||
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have region property")
|
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have region property")
|
||||||
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldZone && cluster.Spec.Zone == "" {
|
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldZone && len(cluster.Spec.Zones) == 0 {
|
||||||
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have zone property")
|
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have zones property")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue