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

Support topologySpreadConstraints #83

Open
robert-mcnamara opened this issue May 23, 2024 · 2 comments · May be fixed by #91
Open

Support topologySpreadConstraints #83

robert-mcnamara opened this issue May 23, 2024 · 2 comments · May be fixed by #91

Comments

@robert-mcnamara
Copy link

Hi,

In order to guarantee that a replica don't get scheduled in the same zone and node as another, we need to be able to specify topologySpreadConstraints.

I am happy to contribute back this change to the project.

@arthurbarr
Copy link

This Helm chart uses a StatefulSet. If you use the topology.kubernetes.io/zone label on your Node resources as is common, then the Kubernetes scheduler will automatically spread the Pods in the StatefulSet across the zones.

I think the default behaviour is what most people are after though, without any of the additional complexity of topologySpreadConstraints. Is there any additional control that you specifically need, or does the above cover it?

@robert-mcnamara
Copy link
Author

robert-mcnamara commented May 23, 2024

This Helm chart uses a StatefulSet. If you use the topology.kubernetes.io/zone label on your Node resources as is common, then the Kubernetes scheduler will automatically spread the Pods in the StatefulSet across the zones.

I think the default behaviour is what most people are after though, without any of the additional complexity of topologySpreadConstraints. Is there any additional control that you specifically need, or does the above cover it?

Thanks for the response.
As far as I understand this is a best effort on the part of the Kubernetes scheduler and can lead to an uneven distribution of pods across zones. It would be a better guarantee to use the topologySpreadConstraints and conditionally include if it needs to be configured.

@robert-mcnamara robert-mcnamara linked a pull request Jun 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants