feat: add queue-level preemptable switch for preempt action
kind/feature
### What is the problem you're trying to solve
### **Background**
Currently, Volcano supports a queue-level switch for the reclaim action via the reclaimable field in the Queue spec. However, no equivalent switch exists for the preempt action.
The only way to control preemption behavior is through the global enablePreemptable flag in the gang plugin configuration, which applies to all queues uniformly. This makes it impossible to enable preemption selectively for specific queues while protecting others.
### **Problem Statement**
In multi-tenant clusters, different business workloads have different requirements:
- Online/production workloads — must not be preempted; interruption causes user-facing impact
- Batch/offline workloads — can tolerate preemption and rescheduling to improve overall cluster utilization
### Describe the solution you'd like
Add a preemptable field to the Queue spec, consistent with the existing reclaimable field design:
```
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
name: batch-queue
spec:
reclaimable: true
preemptable: true # ← new field: jobs in this queue can be preempted
capability:
cpu: 100
memory: 200Gi
```
---
```
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
name: prod-queue
spec:
reclaimable: false
preemptable: false # ← jobs in this queue are protected from preemption
capability:
cpu: 200
memory: 400Gi
```
### Expected behavior:
When preemptable: false — the preempt action is disabled within this queue; jobs inside the queue will not preempt each other regardless of priority difference
When preemptable: true — the preempt action is enabled within this queue; higher-priority PodGroups can evict lower-priority PodGroups in the same queue when resources are insufficient
### Additional context
_No response_
### Documentation Updates
- [ ] This feature requires design or user documentation changes.
- [ ] If documentation changes are required, I will ensure the relevant documents are updated and published to the Volcano official website (https://volcano.sh) via the [volcano-sh/website](https://github.com/volcano-sh/website) repository.
0 条评论