TheRacetrack / racetrack

An opinionated framework for deploying, managing, and serving application workloads
https://theracetrack.github.io/racetrack/
Apache License 2.0
28 stars 6 forks source link

Use podAntiAffinity to spread replicas between different nodes #390

Closed iszulcdeepsense closed 9 months ago

iszulcdeepsense commented 9 months ago

@LookACastle

Code all looks fine, but I can't find it written anywhere why we're doing this. There's no description in the issue (unless I missed it), and there's nothing here either. I feel like it'd be nice to have a short little blurb.

Good point, sorry about this negligence. I've added description:

On one of our Kubernetes clusters, we spotted that 3 Lifecycle pods were all running on the same node, despite the fact that there were 3 nodes available. This is bad in terms of potential failure of this node and unnecessary downtime.

We should use Pod's affinity to distribute pods equally between the nodes.