-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test cases for soft constraints/multi constraints #565
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damemi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -126,7 +126,7 @@ func RemovePodsViolatingTopologySpreadConstraint( | |||
for _, pod := range namespacePods.Items { | |||
for _, constraint := range pod.Spec.TopologySpreadConstraints { | |||
// Ignore soft topology constraints if they are not included | |||
if (strategy.Params == nil || !strategy.Params.IncludeSoftConstraints) && constraint.WhenUnsatisfiable != v1.DoNotSchedule { | |||
if constraint.WhenUnsatisfiable == v1.ScheduleAnyway && (strategy.Params == nil || !strategy.Params.IncludeSoftConstraints) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this to be a bit more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for inclusion, not exclusion
a0f160b
to
5ae5690
Compare
3f8ceb9
to
9faad05
Compare
Turns out there wasn't actually a bug with this, but we should still have these test cases anyway |
/retest |
/lgtm |
Add test cases for soft constraints/multi constraints
Fixes #564
/kind bug