Skip to content

Commit

Permalink
Merge pull request volcano-sh#24 from shivramsrivastava/eventsfix_che…
Browse files Browse the repository at this point in the history
…rrypk

[CHERRY-PICK] Fixed the Pod failure event reason string for the k8s conformance tes…
  • Loading branch information
volcano-sh-bot committed Jun 6, 2019
2 parents 7003812 + 108095f commit 92c4d3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/scheduler/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ func (sc *SchedulerCache) taskUnschedulable(task *api.TaskInfo, message string)

pod := task.Pod.DeepCopy()

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

0 comments on commit 92c4d3f

Please sign in to comment.