Kwok default-scheduler doesn't respect "Topology Spread Constraints" #573
Answered
by
wzshiming
kunZooberg
asked this question in
Q&A
-
I found pods with "Topology Spread Constraints" below can be scheduled into same node in kwok topologySpreadConstraints:
- labelSelector:
matchLabels:
app: appName
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule Repro: |
Beta Was this translation helpful? Give feedback.
Answered by
wzshiming
May 6, 2023
Replies: 1 comment
-
I debugged and found that this was because the values of topologySpreadConstraints:
- labelSelector:
matchLabels:
app: appName
maxSkew: 1
minDomains: 5
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wzshiming
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/kubernetes/kubernetes/blob/7f370d651ddef1106ad0d6fa8fd4e1e8a4bf8d44/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go#L379
I debugged and found that this was because the values of
matchNum
andminMatchNum
were always equal, and givingminDomains
a larger value would then causeminMatchNum
to be set to 0.