Merge pull request #3996 from whitewindmills/deprecated-zone-filter

feat: adapt zones check in spread constraint plugin
This commit is contained in:
karmada-bot 2023-08-25 11:09:04 +08:00 committed by GitHub
commit fb4c16d348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@ func (p *SpreadConstraint) Filter(
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have provider property")
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldRegion && cluster.Spec.Region == "" {
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have region property")
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldZone && cluster.Spec.Zone == "" {
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have zone property")
} else if spreadConstraint.SpreadByField == policyv1alpha1.SpreadByFieldZone && len(cluster.Spec.Zones) == 0 {
return framework.NewResult(framework.Unschedulable, "cluster(s) did not have zones property")
}
}