Scheduler cache comparer

A debug tool that collects resources from api server and compares it
with the scheduler cache. It currently only compares the node list, but
it should be easy to extend. The compare is triggered by signal USER2,
by doing

  kill -12 ${SCHED_PID}

The compare result goes to scheduler log.

Towards #60860
This commit is contained in:
Yongkun Anfernee Gui
2018-03-08 16:32:53 -08:00
parent 73a9836d69
commit fda0d07eb6
7 changed files with 288 additions and 1 deletions

View File

@@ -101,6 +101,7 @@ func (f *FakeCache) FilteredList(filter schedulercache.PodFilter, selector label
return nil, nil
}
// Snapshot is a fake method for testing
func (f *FakeCache) Snapshot() *schedulercache.Snapshot {
return &schedulercache.Snapshot{}
}