Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheComparer ¶
type CacheComparer struct { NodeLister corelisters.NodeLister PodLister corelisters.PodLister Cache godelcache.SchedulerCache UnitPodQueue godelqueue.SchedulingQueue }
CacheComparer is an implementation of the Scheduler's cache comparer.
func (*CacheComparer) Compare ¶
func (c *CacheComparer) Compare() error
Compare compares the nodes and pods of NodeLister with Cache.Snapshot.
func (*CacheComparer) CompareNodes ¶
func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]api.NodeInfo) (missed, redundant []string)
CompareNodes compares actual nodes with cached nodes.
func (*CacheComparer) ComparePods ¶
func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[string]api.NodeInfo) (missed, redundant []string)
ComparePods compares actual pods with cached pods.
type CacheDebugger ¶
type CacheDebugger struct { Comparer CacheComparer Dumper CacheDumper // contains filtered or unexported fields }
CacheDebugger provides ways to check and write cache information for debugging. From https://github.com/kubernetes/kubernetes/pull/70500 The scheduler cache comparer and dumper are triggered together when the scheduler receives a SIGUSR2: kill -SIGUSR2 <the scheduler PID>
func New ¶
func New( nodeLister corelisters.NodeLister, podLister corelisters.PodLister, cache godelcache.SchedulerCache, unitPodQueue godelqueue.SchedulingQueue, ) *CacheDebugger
New creates a CacheDebugger.
func (*CacheDebugger) Close ¶
func (d *CacheDebugger) Close()
func (*CacheDebugger) Run ¶
func (d *CacheDebugger) Run()
Run starts a goroutine that will trigger the CacheDebugger's behavior when the process receives SIGINT (Windows) or SIGUSER2 (non-Windows).
type CacheDumper ¶
type CacheDumper struct {
// contains filtered or unexported fields
}
func (*CacheDumper) DumpAll ¶
func (d *CacheDumper) DumpAll()
DumpAll writes cached nodes and scheduling queue information to the scheduler logs.
func (*CacheDumper) ToString ¶
func (d *CacheDumper) ToString(in interface{}) string
ToString transform to string for better display etc. in log