volcano icon indicating copy to clipboard operation
volcano copied to clipboard

added preemmptable attribute into pod group

Open SuyashParmar opened this issue 7 months ago • 3 comments

What this PR does

  • Adds an optional Preemptable field to PodGroupSpec in the API and CRD.
  • Enables PodGroup-level control over preempt/reclaim actions.
  • Enforces via webhook:
    • If a PodGroup is preemptable, its Pods can be preemptable or not.
    • If a PodGroup is un-preemptable, its Pods cannot be preemptable (checked in the admission webhook).

Special notes for your reviewer

  • No changes to scheduler logic; enforcement is strictly at the webhook/admission level.
  • Backward compatible: Preemptable is optional and defaults to current behavior if unset.

API/CRD changes:

  • Preemptable field added to PodGroupSpec (Go types and CRD schema).

Webhook changes:

  • Pod admission webhook rejects Pods that are preemptable if their PodGroup is un-preemptable.

Fixes #2141

SuyashParmar avatar Jul 25 '25 17:07 SuyashParmar

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign wangyang0616 You can assign the PR to them by writing /assign @wangyang0616 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar Jul 25 '25 17:07 volcano-sh-bot

We should modify API repo first, and the behavior should be: preemptable filed of pg is nil or preemptable==true means pg can be preempted for compatibility.

Monokaix avatar Jul 28 '25 08:07 Monokaix

@SuyashParmar: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

volcano-sh-bot avatar Nov 18 '25 01:11 volcano-sh-bot