Skip to content

Feature Request: Add Support for Configuring Gitlay StatefulSet priorityClassName

Summary

None of the Gitlab charts support configuring the pod priorityClassName, but I think adding support would be trivial and low-risk for a few reasons:

  1. spec.priorityClassName is used as part of the pod priorty and preemption API, which entered beta starting in Kubernetes 1.11 and reached stable in 1.14;
  2. spec.priorityClassName should be optional and set only if supplied via a Value by the user, which means this change is a no-op for existing users.

Note: I'd be happy to submit a PR for this if it's welcome!

Use Case

Our specific (and currently only) use case is to ensure that pods with availability zone restrictions (e.g. with AWS EBS volumes) get scheduling priority over pods without AZ restrictions.

For example, without pod priority support we've ended up in the situation that a pod with AZ restriction can't be scheduled because there's inadequate CPU on any node in the required AZ, which introduces the need for manual pod reshuffling to remove non-AZ-restricted pods. With pod priority, in the same situation the scheduler could know to pre-empt (reschedule) non-AZ restricted pods to make room for the AZ-restricted pod.

Proposal

Since I'm not sure what other people's use-cases might be for priorityClassName with the Gitlab chart, my proposal here is just to add support for configuring spec.priorityClassName on gitaly's StatefulSet via a new priorityClassName Value.

For some examples of what making this change looks like see: