Skip to content

Commit

Permalink
pod could be preempted by default
Browse files Browse the repository at this point in the history
Signed-off-by: Zhe Jin <jinzhe.hit@gmail.com>
  • Loading branch information
jinzhejz authored and wangyang0616 committed Nov 30, 2022
1 parent b2b4577 commit 68d02c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/api/pod_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func GetPodPreemptable(pod *v1.Pod) bool {
}
}

return false
return true
}

// GetPodRevocableZone return volcano.sh/revocable-zone value for pod/podgroup
Expand Down
3 changes: 3 additions & 0 deletions pkg/scheduler/plugins/tdm/tdm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ func Test_TDM_victimsFn(t *testing.T) {
p2.Annotations[schedulingv2.PodPreemptable] = "true"
p3.Annotations[schedulingv2.PodPreemptable] = "true"

p4.Annotations[schedulingv2.PodPreemptable] = "false"
p5.Annotations[schedulingv2.PodPreemptable] = "false"

p6.Annotations[schedulingv2.PodPreemptable] = "true"
p7.Annotations[schedulingv2.PodPreemptable] = "true"
p8.Annotations[schedulingv2.PodPreemptable] = "true"
Expand Down

0 comments on commit 68d02c8

Please sign in to comment.