-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Logstash chart should support pod topologySpreadConstraints #1513
Description
Feature
The Logstash chart should support specification of topologySpreadConstraints on the pods created by the statefulsets template.
I will file a PR that supports this feature.
Justification
In many cases, we deploy Logstash releases that create a number of pods that exceed the number of nodes in the target cluster. This is the case when using Logstash to process large workloads from a message queue. In the interest of not overloading any one node of the cluster, we want to spread out the scheduling of these pods evenly across all worker nodes in the Kubernetes cluster.
The existing affinity: podAntiAffinity rules are not helpful under these circumstances. podAntiAffinity effectively will spread out the pods only as long as the number of pods does not exceed the count of worker nodes in the cluster. After that, podAntiAffinity actually blocks scaling of the statefulSet.
topologySpreadConstraints , by contrast, allow us to more flexibly inform the scheduler how we want workloads distributed on the cluster, and allow us to specify the whenUnsatisfiable: ScheduleAnyway option to signal to the scheduler that the workload should be deployed even if the ideal pod distribution cannot be achieved.