Skip to content

Commit 92c4d3f

Browse files
Merge pull request volcano-sh#24 from shivramsrivastava/eventsfix_cherrypk
[CHERRY-PICK] Fixed the Pod failure event reason string for the k8s conformance tes…
2 parents 7003812 + 108095f commit 92c4d3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/scheduler/cache/cache.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ func (sc *SchedulerCache) taskUnschedulable(task *api.TaskInfo, message string)
465465

466466
pod := task.Pod.DeepCopy()
467467

468-
sc.Recorder.Eventf(pod, v1.EventTypeWarning, string(v1.PodReasonUnschedulable), message)
468+
// The reason field in 'Events' should be "FailedScheduling", there is not constants defined for this in
469+
// k8s core, so using the same string here.
470+
// The reason field in PodCondition should be "Unschedulable"
471+
sc.Recorder.Eventf(pod, v1.EventTypeWarning, "FailedScheduling", message)
469472
if _, err := sc.StatusUpdater.UpdatePodCondition(pod, &v1.PodCondition{
470473
Type: v1.PodScheduled,
471474
Status: v1.ConditionFalse,

0 commit comments

Comments
 (0)