Skip to content
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

Topologyspread configuration #1844

Open
tolleiv opened this issue Aug 4, 2023 · 1 comment
Open

Topologyspread configuration #1844

tolleiv opened this issue Aug 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tolleiv
Copy link

tolleiv commented Aug 4, 2023

Using infinispan-operator 2.3.3 provides Pods with a Pod-Anti-Affinity configuration to split them to different hosts, this is a good default.

With topology-spread-constraints this can be done in a more relyable way (see https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#comparison-with-podaffinity-podantiaffinity ).

podAntiAffinity:
repels Pods. If you set this to requiredDuringSchedulingIgnoredDuringExecution mode then only a single Pod can be scheduled into a single topology domain; if you choose preferredDuringSchedulingIgnoredDuringExecution then you lose the ability to enforce the constraint.

It would be great if the InfinitySpan CR would allow to also allow to define topologySpreadConstraints.

@ryanemerson
Copy link
Contributor

Thanks for creating the issue @tolleiv. This is an area we're continuing to evolve and we plan to add this in the future.

I have just merged a PR #1851 that allows a pod's priortyClass to be configured via spec.scheduling, so the intention would be to build upon this work and provide the following API:

spec:
  scheduling:
      # Configure a topology spread constraint
    topologySpreadConstraints:
      - maxSkew: <integer>
        minDomains: <integer> # optional; beta since v1.25
        topologyKey: <string>
        whenUnsatisfiable: <string>
        labelSelector: <object>
        matchLabelKeys: <list> # optional; beta since v1.27
        nodeAffinityPolicy: [Honor|Ignore] # optional; beta since v1.26
        nodeTaintsPolicy: [Honor|Ignore] # optional; beta since v1.26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants