Documentation ¶
Index ¶
- Constants
- func CleanupPodAnnotations(client clientset.Interface, pod *v1.Pod) error
- func CreateScheduleUnit(pcLister schedulingv1.PriorityClassLister, pgLister v1alpha1.PodGroupLister, ...) (framework.ScheduleUnit, error)
- func GetUnitIdentifier(info *framework.QueuedPodInfo) string
- func GetUnitType(pod *v1.Pod) framework.ScheduleUnitType
- func LockPodGroupStatus(pgClient pgclientset.Interface, pgLister pglister.PodGroupLister, ...) error
- func PodBelongToUnit(pod *v1.Pod) bool
- func UpdateMovement(movementClient godelclient.Interface, movementLister v1alpha1.MovementLister, ...) bool
- func UpdateReservationStatus(crdClient godelclient.Interface, lister v1alpha1.ReservationLister, ...) error
- type BinderUnitInfo
- type BindingPod
- type FailedPod
- type PodCtx
- type Preemptor
Constants ¶
View Source
const ( MaxRetryAttemptsForMovement int = 20 DefaultBackoff time.Duration = 100 * time.Millisecond )
View Source
const ( RetryAttemptsOfUpdatingReservation = 3 RetryWaitTime = 1 * time.Second )
View Source
const MaxRetryAttempts = 3 // TODO: 5 will cause a timeout in UT (30s)
Variables ¶
This section is empty.
Functions ¶
func CleanupPodAnnotations ¶
func CreateScheduleUnit ¶
func CreateScheduleUnit(pcLister schedulingv1.PriorityClassLister, pgLister v1alpha1.PodGroupLister, info *framework.QueuedPodInfo) (framework.ScheduleUnit, error)
CreateScheduleUnit create an unit object from the pod. binder only deal with units, a single pod will be wrapped as a unit. the tricky thing here is podGroup event may come later, it may not be able to fetch the pod group objects. In this case, we won't move pods from activeQ to readyQ, caller should handle the not found issue.
func GetUnitIdentifier ¶
func GetUnitIdentifier(info *framework.QueuedPodInfo) string
GetUnitIdentifier return id of the unit.
func GetUnitType ¶
func GetUnitType(pod *v1.Pod) framework.ScheduleUnitType
GetUnitType return unit type of the pod. This method assumes pod belongs to unit
func LockPodGroupStatus ¶
func LockPodGroupStatus( pgClient pgclientset.Interface, pgLister pglister.PodGroupLister, unit api.ScheduleUnit, operator string, ) error
func PodBelongToUnit ¶
PodBelongToUnit check whether the pod belongs to the unit.
func UpdateMovement ¶
func UpdateMovement(movementClient godelclient.Interface, movementLister v1alpha1.MovementLister, assumedPod *v1.Pod) bool
TODO: move to postbind plugin return needReEnqueue bool
func UpdateReservationStatus ¶
func UpdateReservationStatus(crdClient godelclient.Interface, lister v1alpha1.ReservationLister, assumedPod, placeholderPod *v1.Pod, succeed bool) error
Types ¶
type BinderUnitInfo ¶
type BinderUnitInfo struct { *framework.QueuedUnitInfo FailedPods []*FailedPod // pods belong to the unit which are not in failed status or preemptors. BindingPods []*BindingPod Preemptors []*Preemptor NodeToVictims map[string][]*v1.Pod }
type BindingPod ¶
type BindingPod struct { PodInfo *framework.QueuedPodInfo Ctx *PodCtx // if it's true, BindingPod will be wrapped as a Preemptor IsPreemptor bool // placeholder pod for resource reservation. PlaceholderPod *v1.Pod }
func NewBindingPod ¶
func NewBindingPod(pInfo *framework.QueuedPodInfo) *BindingPod
type FailedPod ¶
type FailedPod struct { PodInfo *framework.QueuedPodInfo // placeholder pod for resource reservation. PlaceholderPod *v1.Pod Err error }
type PodCtx ¶
type PodCtx struct { Ctx context.Context State *framework.CycleState CheckConflictTime time.Time Framework framework.BinderFramework AllBound bool SpanContext tracing.SpanContext SuggestedHost string }
type Preemptor ¶
type Preemptor struct { *BindingPod VictimPods []*v1.Pod }
Click to show internal directories.
Click to hide internal directories.