Support topologySpreadConstraints
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.
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?
This Helm chart uses a StatefulSet. If you use the
topology.kubernetes.io/zonelabel 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.
Closing as addressed in #97