From 1ca4aaf31628038a973c85d543f62e2ef5ae686e Mon Sep 17 00:00:00 2001 From: Rajadeepan Date: Wed, 13 Mar 2019 12:55:54 +0000 Subject: [PATCH] Add event when task is scheduled --- pkg/scheduler/cache/cache.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/scheduler/cache/cache.go b/pkg/scheduler/cache/cache.go index df0b533bf..9758caf3b 100644 --- a/pkg/scheduler/cache/cache.go +++ b/pkg/scheduler/cache/cache.go @@ -423,6 +423,8 @@ func (sc *SchedulerCache) Bind(taskInfo *kbapi.TaskInfo, hostname string) error go func() { if err := sc.Binder.Bind(p, hostname); err != nil { sc.resyncTask(task) + } else { + sc.Recorder.Eventf(p, v1.EventTypeNormal, "Scheduled", "Successfully assigned %v/%v to %v", p.Namespace, p.Name, hostname) } }()