Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code int
Code is the Status code/type which is returned from plugins.
const ( // Success means that plugin ran correctly and found pod schedulable. // NOTE: A nil status is also considered as "Success". Success Code = iota // Error is used for internal plugin errors, unexpected input, etc. Error // Unschedulable is used when a plugin finds a pod unschedulable. The scheduler might attempt to // preempt other pods to get this pod scheduled. Use UnschedulableAndUnresolvable to make the // scheduler skip preemption. // The accompanying status message should explain why the pod is unschedulable. Unschedulable // UnschedulableAndUnresolvable is used when a PreFilter plugin finds a pod unschedulable and // preemption would not change anything. Plugins should return Unschedulable if it is possible // that the pod can get scheduled with preemption. // The accompanying status message should explain why the pod is unschedulable. UnschedulableAndUnresolvable // Wait is used when a Permit plugin finds a pod scheduling should wait. Wait // Skip is used when a Bind plugin chooses to skip binding. Skip )
type FilterPlugin ¶
type FilterPlugin interface { Plugin Filter(ctx context.Context, QueueUnit *QueueUnitInfo) *Status }
type Framework ¶
type Framework interface { // QueueSortFunc returns the function to sort pods in scheduling queue MultiQueueSortFunc() MultiQueueLessFunc QueueSortFuncMap() map[string]QueueLessFunc RunFilterPlugins(context.Context, *QueueUnitInfo) *Status RunScorePlugins(context.Context) (int64, bool) RunReservePluginsReserve(context.Context, *QueueUnitInfo) *Status RunReservePluginsUnreserve(context.Context, *QueueUnitInfo) }
type MultiQueueLessFunc ¶
type MultiQueueSortPlugin ¶
type Plugin ¶
type Plugin interface {
Name() string
}
Plugin is the parent type for all the scheduling framework plugins.
type QueueLessFunc ¶
type QueueLessFunc func(*QueueUnitInfo, *QueueUnitInfo) bool
type QueueSortPlugin ¶
type QueueSortPlugin interface { Plugin QueueLess(*QueueUnitInfo, *QueueUnitInfo) bool }
type QueueUnitInfo ¶
type QueueUnitInfo struct { // Name is namespace + "/" + name Name string Unit *v1alpha1.QueueUnit // The time QueueUnit added to the scheduling queue. Timestamp time.Time // Number of schedule attempts before successfully scheduled. Attempts int // The time when the QueueUnit is added to the queue for the first time. InitialAttemptTimestamp time.Time }
QueueUnitInfo is a Queue wrapper with additional information related to the QueueUnit
func NewQueueUnitInfo ¶
func NewQueueUnitInfo(unit *v1alpha1.QueueUnit) *QueueUnitInfo
NewQueueUnitInfo constructs QueueUnitInfo
type ReservePlugin ¶
type ReservePlugin interface { Plugin Reserve(ctx context.Context, QueueUnit *QueueUnitInfo) *Status Unreserve(ctx context.Context, QueueUnit *QueueUnitInfo) }
type ScorePlugin ¶
ScorePlugin is an interface that must be implemented by "Score" plugins to rank nodes that passed the filtering phase.
Click to show internal directories.
Click to hide internal directories.