Skip to content

Commit

Permalink
Fix condition on goals
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho committed Nov 3, 2021
1 parent 067b1c3 commit 62acb98
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ But, there isn't a way to control the number of domains over which we should spr

Users can define a maximum number of domains with `maxDomains` parameter

When the number of Pods is more than `maxDomains`,
When the number of domains >= `maxDomains`,

- when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler schedules each Pods to a different Node.
i.e. scheduler filters Nodes that don't have matching Pods in the `Filter` phase.
- when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes that have matching Pods.
- when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler schedules each Pods to Nodes on the domains that have matching Pods.
i.e. scheduler filters Nodes on the domains that don't have matching Pods in the `Filter` phase.
- when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes on the domain that have matching Pods.
i.e. scheduler gives a high score to Nodes that have matching Pods in the `Score` phase.

And, Users can define a minimum number of domains with `minDomains` parameter

When the number of Pods is less than `minDomains`,
When the number of domains < `minDomains`,

- when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler doesn't schedule a matching Pod to Nodes that have matching Pods.
i.e. scheduler filters Nodes that have matching Pods in the `Filter` phase.
- when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes that don't have matching Pods.
i.e. scheduler gives a high score to Nodes that don't have matching Pods in the `Score` phase.
- when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler doesnt schedule a matching Pod to Nodes on the domains that have matching Pods.
i.e. scheduler filters Nodes on the domains that have matching Pods in the `Filter` phase.
- when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes on the domains that don't have matching Pods.
i.e. scheduler gives a high score to Nodes on the domains that don't have matching Pods in the `Score` phase.

## Proposal

Expand All @@ -107,19 +107,18 @@ type TopologySpreadConstraint struct {
......
// MaxDomains describes the maximum number of domains.
// When the number of Pods is more than `maxDomains`,
// - when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler schedules each Pods to a different Node.
// i.e. scheduler filters Nodes that don't have matching Pods in the `Filter` phase.
// - when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes that have matching Pods.
// - when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler schedules each Pods to Nodes on the domains that have matching Pods.
// i.e. scheduler filters Nodes on the domains that don't have matching Pods in the `Filter` phase.
// - when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes on the domain that have matching Pods.
// i.e. scheduler gives a high score to Nodes that have matching Pods in the `Score` phase.
// +optional
MaxDomains int32
// MinDomains describes the minimum number of domains.
// When the number of Pods is less than `minDomains`,
// - when `whenUnsatisfiable` equals `DoNotSchedule`,
// scheduler doesn't schedule a matching Pod to Nodes that have matching Pods.
// i.e. scheduler filters Nodes that have matching Pods in the `Filter` phase.
// - when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes that don't have matching Pods.
// i.e. scheduler gives a high score to Nodes that don't have matching Pods in the `Score` phase.
// - when `whenUnsatisfiable` equals `DoNotSchedule`, scheduler doesn’t schedule a matching Pod to Nodes on the domains that have matching Pods.
// i.e. scheduler filters Nodes on the domains that have matching Pods in the `Filter` phase.
// - when `whenUnsatisfiable` equals `ScheduleAnyway`, scheduler prefers Nodes on the domains that don't have matching Pods.
// i.e. scheduler gives a high score to Nodes on the domains that don't have matching Pods in the `Score` phase.
// +optional
MinDomains int32
}
Expand Down

0 comments on commit 62acb98

Please sign in to comment.