Documentation ¶
Index ¶
- Constants
- type ScheduleOperation
- func (sop *ScheduleOperation) AddToDenyCache(fullName string)
- func (sop *ScheduleOperation) Compare(podInfo1, podInfo2 interface{}) bool
- func (sop *ScheduleOperation) Filter(pod *corev1.Pod, nodeName string) error
- func (sop *ScheduleOperation) GetPodNameUIDs(fullName string) *gochache.Cache
- func (sop *ScheduleOperation) GetPodNodePairs(fullName string) *gochache.Cache
- func (sop *ScheduleOperation) Permit(pod *corev1.Pod, nodeName string) (bool, string, error)
- func (sop *ScheduleOperation) PodGroupStatusCache() cache.Cache
- func (sop *ScheduleOperation) PostBind(pod *corev1.Pod, nodeName string)
- func (sop *ScheduleOperation) PreFilter(pod *corev1.Pod) error
- func (sop *ScheduleOperation) PreemptAddPod(podToAdd *corev1.Pod, nodeName string) error
- func (sop *ScheduleOperation) PreemptRemovePod(podToSchedule, podToRemove *corev1.Pod) error
- func (sop *ScheduleOperation) Score(pod *corev1.Pod, nodeName string) (int, error)
Constants ¶
const Max = 2147483647
Max score for Score
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleOperation ¶
ScheduleOperation defines the scheduling opeation called
func NewScheduleOperation ¶
func NewScheduleOperation(pgClient *pgclientset.Clientset, cache cache.Cache, frameworkHandler framework.FrameworkHandle, maxScheTime *time.Duration, pgInformer pginformer.PodGroupInformer) *ScheduleOperation
NewScheduleOperation create a new operation object
func (*ScheduleOperation) AddToDenyCache ¶
func (sop *ScheduleOperation) AddToDenyCache(fullName string)
AddToDenyCache add podGroup to the back list cache
func (*ScheduleOperation) Compare ¶
func (sop *ScheduleOperation) Compare(podInfo1, podInfo2 interface{}) bool
Compare returns the true or false, base on 1. priority 2. podGroup creation time 3. pod creation time
func (*ScheduleOperation) Filter ¶
func (sop *ScheduleOperation) Filter(pod *corev1.Pod, nodeName string) error
Filter filter pod if not fit on the node
func (*ScheduleOperation) GetPodNameUIDs ¶
func (sop *ScheduleOperation) GetPodNameUIDs(fullName string) *gochache.Cache
GetPodNameUIDs returns podName and uid pairs.
func (*ScheduleOperation) GetPodNodePairs ¶
func (sop *ScheduleOperation) GetPodNodePairs(fullName string) *gochache.Cache
GetPodNodePairs returns the pod-node paired to be scheduled.
func (*ScheduleOperation) Permit ¶
Permit permits a pod to run, if the minMember match, it would send a signal to chan.
func (*ScheduleOperation) PodGroupStatusCache ¶
func (sop *ScheduleOperation) PodGroupStatusCache() cache.Cache
PodGroupStatusCache returns the podGroupStatusCache
func (*ScheduleOperation) PostBind ¶
func (sop *ScheduleOperation) PostBind(pod *corev1.Pod, nodeName string)
PostBind is used for send metrics and update to api if all finish
func (*ScheduleOperation) PreFilter ¶
func (sop *ScheduleOperation) PreFilter(pod *corev1.Pod) error
PreFilter pre-filter pod include: 1. cluster resource 2. last denied pod to increase schedule qps 3. last permitted pod to increase schedule qps
func (*ScheduleOperation) PreemptAddPod ¶
func (sop *ScheduleOperation) PreemptAddPod(podToAdd *corev1.Pod, nodeName string) error
PreemptAddPod currently always return nil
func (*ScheduleOperation) PreemptRemovePod ¶
func (sop *ScheduleOperation) PreemptRemovePod(podToSchedule, podToRemove *corev1.Pod) error
PreemptRemovePod requires: 1. online resource could preempt online offline 2. offline could preempt low process and not running offline 3. online preempt offline 4. offline preempt offline