Skip to content

Kwok default-scheduler doesn't respect "Topology Spread Constraints" #573

Answered by wzshiming
kunZooberg asked this question in Q&A
Discussion options

You must be logged in to vote

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 and minMatchNum were always equal, and giving minDomains a larger value would then cause minMatchNum to be set to 0.

        topologySpreadConstraints:
        - labelSelector:
            matchLabels:
              app: appName
          maxSkew: 1
          minDomains: 5
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: DoNotSchedule

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wzshiming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants