Documentation ¶
Index ¶
- type Binder
- type Cache
- type Evictor
- type SchedulerCache
- func (sc *SchedulerCache) AddNode(obj interface{})
- func (sc *SchedulerCache) AddPod(obj interface{})
- func (sc *SchedulerCache) AddPodGroupV1beta1(obj interface{})
- func (sc *SchedulerCache) AddPriorityClass(obj interface{})
- func (sc *SchedulerCache) AddQueueV1beta1(obj interface{})
- func (sc *SchedulerCache) AddResourceQuota(obj interface{})
- func (sc *SchedulerCache) AllocateVolumes(task *schedulingapi.TaskInfo, hostname string) error
- func (sc *SchedulerCache) Bind(taskInfo *schedulingapi.TaskInfo, hostname string) error
- func (sc *SchedulerCache) BindVolumes(task *schedulingapi.TaskInfo) error
- func (sc *SchedulerCache) DeleteNode(obj interface{})
- func (sc *SchedulerCache) DeletePod(obj interface{})
- func (sc *SchedulerCache) DeletePodGroupV1beta1(obj interface{})
- func (sc *SchedulerCache) DeletePriorityClass(obj interface{})
- func (sc *SchedulerCache) DeleteQueueV1beta1(obj interface{})
- func (sc *SchedulerCache) DeleteResourceQuota(obj interface{})
- func (sc *SchedulerCache) Evict(taskInfo *schedulingapi.TaskInfo, reason string) error
- func (sc *SchedulerCache) RecordJobStatusEvent(job *schedulingapi.JobInfo)
- func (sc *SchedulerCache) Run(stopCh <-chan struct{})
- func (sc *SchedulerCache) Snapshot() *schedulingapi.ClusterInfo
- func (sc *SchedulerCache) String() string
- func (sc *SchedulerCache) UpdateJobStatus(job *schedulingapi.JobInfo, updatePG bool) (*schedulingapi.JobInfo, error)
- func (sc *SchedulerCache) UpdateNode(oldObj, newObj interface{})
- func (sc *SchedulerCache) UpdatePod(oldObj, newObj interface{})
- func (sc *SchedulerCache) UpdatePodGroupV1beta1(oldObj, newObj interface{})
- func (sc *SchedulerCache) UpdatePriorityClass(oldObj, newObj interface{})
- func (sc *SchedulerCache) UpdateQueueV1beta1(oldObj, newObj interface{})
- func (sc *SchedulerCache) UpdateResourceQuota(oldObj, newObj interface{})
- func (sc *SchedulerCache) WaitForCacheSync(stopCh <-chan struct{}) bool
- type StatusUpdater
- type VolumeBinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Run start informer Run(stopCh <-chan struct{}) // Snapshot deep copy overall cache information into snapshot Snapshot() *api.ClusterInfo // WaitForCacheSync waits for all cache synced WaitForCacheSync(stopCh <-chan struct{}) bool // Bind binds Task to the target host. // TODO(jinzhej): clean up expire Tasks. Bind(task *api.TaskInfo, hostname string) error // Evict evicts the task to release resources. Evict(task *api.TaskInfo, reason string) error // RecordJobStatusEvent records related events according to job status. // Deprecated: remove it after removed PDB support. RecordJobStatusEvent(job *api.JobInfo) // UpdateJobStatus puts job in backlog for a while. UpdateJobStatus(job *api.JobInfo, updatePG bool) (*api.JobInfo, error) // AllocateVolumes allocates volume on the host to the task AllocateVolumes(task *api.TaskInfo, hostname string) error // BindVolumes binds volumes to the task BindVolumes(task *api.TaskInfo) error }
Cache collects pods/nodes/queues information and provides information snapshot
type SchedulerCache ¶
type SchedulerCache struct { sync.Mutex Binder Binder Evictor Evictor StatusUpdater StatusUpdater VolumeBinder VolumeBinder Recorder record.EventRecorder Jobs map[schedulingapi.JobID]*schedulingapi.JobInfo Nodes map[string]*schedulingapi.NodeInfo Queues map[schedulingapi.QueueID]*schedulingapi.QueueInfo PriorityClasses map[string]*v1beta1.PriorityClass NamespaceCollection map[string]*schedulingapi.NamespaceCollection // contains filtered or unexported fields }
SchedulerCache cache for the kube batch
func (*SchedulerCache) AddNode ¶
func (sc *SchedulerCache) AddNode(obj interface{})
AddNode add node to scheduler cache
func (*SchedulerCache) AddPod ¶
func (sc *SchedulerCache) AddPod(obj interface{})
AddPod add pod to scheduler cache
func (*SchedulerCache) AddPodGroupV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) AddPodGroupV1beta1(obj interface{})
AddPodGroupV1beta1 add podgroup to scheduler cache
func (*SchedulerCache) AddPriorityClass ¶
func (sc *SchedulerCache) AddPriorityClass(obj interface{})
AddPriorityClass add priorityclass to scheduler cache
func (*SchedulerCache) AddQueueV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) AddQueueV1beta1(obj interface{})
AddQueueV1beta1 add queue to scheduler cache
func (*SchedulerCache) AddResourceQuota ¶
func (sc *SchedulerCache) AddResourceQuota(obj interface{})
AddResourceQuota add ResourceQuota to scheduler cache
func (*SchedulerCache) AllocateVolumes ¶
func (sc *SchedulerCache) AllocateVolumes(task *schedulingapi.TaskInfo, hostname string) error
AllocateVolumes allocates volume on the host to the task
func (*SchedulerCache) Bind ¶
func (sc *SchedulerCache) Bind(taskInfo *schedulingapi.TaskInfo, hostname string) error
Bind binds task to the target host.
func (*SchedulerCache) BindVolumes ¶
func (sc *SchedulerCache) BindVolumes(task *schedulingapi.TaskInfo) error
BindVolumes binds volumes to the task
func (*SchedulerCache) DeleteNode ¶
func (sc *SchedulerCache) DeleteNode(obj interface{})
DeleteNode delete node from scheduler cache
func (*SchedulerCache) DeletePod ¶
func (sc *SchedulerCache) DeletePod(obj interface{})
DeletePod delete pod from scheduler cache
func (*SchedulerCache) DeletePodGroupV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) DeletePodGroupV1beta1(obj interface{})
DeletePodGroupV1beta1 delete podgroup from scheduler cache
func (*SchedulerCache) DeletePriorityClass ¶
func (sc *SchedulerCache) DeletePriorityClass(obj interface{})
DeletePriorityClass delete priorityclass from the scheduler cache
func (*SchedulerCache) DeleteQueueV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) DeleteQueueV1beta1(obj interface{})
DeleteQueueV1beta1 delete queue from the scheduler cache
func (*SchedulerCache) DeleteResourceQuota ¶
func (sc *SchedulerCache) DeleteResourceQuota(obj interface{})
DeleteResourceQuota delete ResourceQuota from the scheduler cache
func (*SchedulerCache) Evict ¶
func (sc *SchedulerCache) Evict(taskInfo *schedulingapi.TaskInfo, reason string) error
Evict will evict the pod.
If error occurs both task and job are guaranteed to be in the original state.
func (*SchedulerCache) RecordJobStatusEvent ¶
func (sc *SchedulerCache) RecordJobStatusEvent(job *schedulingapi.JobInfo)
RecordJobStatusEvent records related events according to job status.
func (*SchedulerCache) Run ¶
func (sc *SchedulerCache) Run(stopCh <-chan struct{})
Run starts the schedulerCache
func (*SchedulerCache) Snapshot ¶
func (sc *SchedulerCache) Snapshot() *schedulingapi.ClusterInfo
Snapshot returns the complete snapshot of the cluster from cache
func (*SchedulerCache) String ¶
func (sc *SchedulerCache) String() string
String returns information about the cache in a string format
func (*SchedulerCache) UpdateJobStatus ¶
func (sc *SchedulerCache) UpdateJobStatus(job *schedulingapi.JobInfo, updatePG bool) (*schedulingapi.JobInfo, error)
UpdateJobStatus update the status of job and its tasks.
func (*SchedulerCache) UpdateNode ¶
func (sc *SchedulerCache) UpdateNode(oldObj, newObj interface{})
UpdateNode update node to scheduler cache
func (*SchedulerCache) UpdatePod ¶
func (sc *SchedulerCache) UpdatePod(oldObj, newObj interface{})
UpdatePod update pod to scheduler cache
func (*SchedulerCache) UpdatePodGroupV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) UpdatePodGroupV1beta1(oldObj, newObj interface{})
UpdatePodGroupV1beta1 add podgroup to scheduler cache
func (*SchedulerCache) UpdatePriorityClass ¶
func (sc *SchedulerCache) UpdatePriorityClass(oldObj, newObj interface{})
UpdatePriorityClass update priorityclass to scheduler cache
func (*SchedulerCache) UpdateQueueV1beta1 ¶ added in v0.4.0
func (sc *SchedulerCache) UpdateQueueV1beta1(oldObj, newObj interface{})
UpdateQueueV1beta1 update queue to scheduler cache
func (*SchedulerCache) UpdateResourceQuota ¶
func (sc *SchedulerCache) UpdateResourceQuota(oldObj, newObj interface{})
UpdateResourceQuota update ResourceQuota to scheduler cache
func (*SchedulerCache) WaitForCacheSync ¶
func (sc *SchedulerCache) WaitForCacheSync(stopCh <-chan struct{}) bool
WaitForCacheSync sync the cache with the api server