k8up-io / k8up

Kubernetes and OpenShift Backup Operator
https://k8up.io/
Apache License 2.0
601 stars 62 forks source link

Allow to set the priorityClassName of Backup pods #960

Closed onjen closed 3 weeks ago

onjen commented 3 months ago

Summary

For RWO backup pods allow to set the priorityClassName to allow other pods on the node to be preempted in case the node reached its resource capacity.

Context

With RWO backups pods, a node selector is set on the pod to make sure that the Backup pod is scheduled on the same node as the pod with the mounted volume. This is working fine. However if the resources requested by the backup pod are higher than the remaining resources on the node, the pod is not scheduled on the specified node. Other pods on the node are not preempted, because the backup pod has the default priority set (priority 0). The backup pod would stay in pending state.

Allowing to set a priorityClassName for the backup pod with a PriorityClass higher than the default priority would cause the scheduler to preempt pods on the node and schedule the backup pod instead.

Out of Scope

No response

Further links

Acceptance Criteria

No response

Implementation Ideas

Kidswiss commented 1 month ago

Hi @onjen

We've implemented the ability to configure the whole pod spec in backups ands schedules: https://docs.k8up.io/k8up/2.10/how-tos/backup.html#_customize_pod_spec

Does that solve your issue?

onjen commented 3 weeks ago

Yes, a priorityClassName can be set via the pod spec. Thanks!