Unverified Commit 12e8f01d authored by karmada-bot's avatar karmada-bot Committed by GitHub
Browse files

Merge pull request #2451 from XiShanYongYe-Chang/fix-2447

[bugfix] when replicaDivisionPreference is Weighted and WeightPreference is nil
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -245,7 +245,8 @@ func isTopologyIgnored(placement *policyv1alpha1.Placement) bool {
// If the replica division preference is 'static weighted', ignore the declaration specified by spread constraints.
if strategy != nil && strategy.ReplicaSchedulingType == policyv1alpha1.ReplicaSchedulingTypeDivided &&
strategy.ReplicaDivisionPreference == policyv1alpha1.ReplicaDivisionPreferenceWeighted &&
(len(strategy.WeightPreference.StaticWeightList) != 0 && strategy.WeightPreference.DynamicWeight == "") {
(strategy.WeightPreference == nil ||
len(strategy.WeightPreference.StaticWeightList) != 0 && strategy.WeightPreference.DynamicWeight == "") {
return true
}
......
Supports Markdown
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