Documentation ¶
Index ¶
- func PodPassesFiltersOnNode(ctx context.Context, fw framework.SchedulerFramework, ...) (bool, *framework.Status, framework.PluginToStatus, error)
- type GodelSchedulerFramework
- func (f *GodelSchedulerFramework) GetPotentialVictims(node string) []string
- func (f *GodelSchedulerFramework) HasCrossNodesConstraints(ctx context.Context, pod *v1.Pod) bool
- func (f *GodelSchedulerFramework) HasFilterPlugins() bool
- func (f *GodelSchedulerFramework) HasScorePlugins() bool
- func (f *GodelSchedulerFramework) InitCycleState(pod *v1.Pod) (*framework.CycleState, error)
- func (f *GodelSchedulerFramework) ListPlugins() map[string]sets.String
- func (f *GodelSchedulerFramework) RunFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) framework.PluginToStatus
- func (f *GodelSchedulerFramework) RunPreFilterExtensionAddPod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) (status *framework.Status)
- func (f *GodelSchedulerFramework) RunPreFilterExtensionRemovePod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) (status *framework.Status)
- func (f *GodelSchedulerFramework) RunPreFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status
- func (f *GodelSchedulerFramework) RunPreScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (f *GodelSchedulerFramework) RunScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (framework.PluginToNodeScores, *framework.Status)
- func (f *GodelSchedulerFramework) SetPotentialVictims(node string, potentialVictims []string)
- type GodelSchedulerPreemptionFramework
- func (f *GodelSchedulerPreemptionFramework) HasVictimSearchingPlugin(pluginName string) bool
- func (f *GodelSchedulerPreemptionFramework) ListPlugins() map[string]sets.String
- func (f *GodelSchedulerPreemptionFramework) RunCandidatesSortingPlugins(candidates []*framework.Candidate, candidate *framework.Candidate) []*framework.Candidate
- func (f *GodelSchedulerPreemptionFramework) RunClusterPrePreemptingPlugins(preemptor *v1.Pod, state, commonState *framework.CycleState) *framework.Status
- func (f *GodelSchedulerPreemptionFramework) RunNodePostPreemptingPlugins(preemptor *v1.Pod, victims []*v1.Pod, state, commonState *framework.CycleState) *framework.Status
- func (f *GodelSchedulerPreemptionFramework) RunNodePrePreemptingPlugins(preemptor *v1.Pod, nodeInfo framework.NodeInfo, ...) *framework.Status
- func (f *GodelSchedulerPreemptionFramework) RunPostVictimSearchingPlugins(preemptor *v1.Pod, podInfo *framework.PodInfo, ...) *framework.Status
- func (f *GodelSchedulerPreemptionFramework) RunVictimSearchingPlugins(preemptor *v1.Pod, podInfo *framework.PodInfo, ...) (framework.Code, string)
- type MetricsRecorder
- type PluginsConstraint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PodPassesFiltersOnNode ¶
func PodPassesFiltersOnNode( ctx context.Context, fw framework.SchedulerFramework, state *framework.CycleState, pod *v1.Pod, info framework.NodeInfo, skipPlugins ...string, ) (bool, *framework.Status, framework.PluginToStatus, error)
PodPassesFiltersOnNode checks whether a node given by NodeInfo satisfies the filter plugins. This function is called from two different places: Schedule and Preempt. When it is called from Schedule, we want to test whether the pod is schedulable on the node with all the existing pods on the node plus higher and equal priority pods nominated to run on the node. When it is called from Preempt, we should remove the victims of preemption and add the nominated pods. Removal of the victims is done by SelectVictimsOnNode(). Preempt removes victims from PreFilter state and NodeInfo before calling this function.
Types ¶
type GodelSchedulerFramework ¶
type GodelSchedulerFramework struct {
// contains filtered or unexported fields
}
GodelSchedulerFramework is the component responsible for initializing and running scheduler plugins, determining plugins to run in each scheduling phase(or extension point)
func NewPodFramework ¶
func NewPodFramework(pluginRegistry framework.PluginMap, pluginOrder framework.PluginOrder, basePlugins, hardConstraints, softConstraints *framework.PluginCollection, metricsRecorder *MetricsRecorder, ) (*GodelSchedulerFramework, error)
New creates a new GodelSchedulerFramework, where pluginRegistry marks which plugins are supported, basePlugins presents which plugins are enabled by default. podConstraintConfigs are used in pod annotation, where hard constraint will be taken as filter plugins and soft constraint will be taken as score plugins. If plugin in podConstraintConfigs not exists in basePlugins, add this plugin to the new Godel Framework.
func (*GodelSchedulerFramework) GetPotentialVictims ¶
func (f *GodelSchedulerFramework) GetPotentialVictims(node string) []string
func (*GodelSchedulerFramework) HasCrossNodesConstraints ¶
func (*GodelSchedulerFramework) HasFilterPlugins ¶
func (f *GodelSchedulerFramework) HasFilterPlugins() bool
func (*GodelSchedulerFramework) HasScorePlugins ¶
func (f *GodelSchedulerFramework) HasScorePlugins() bool
func (*GodelSchedulerFramework) InitCycleState ¶
func (f *GodelSchedulerFramework) InitCycleState(pod *v1.Pod) (*framework.CycleState, error)
func (*GodelSchedulerFramework) ListPlugins ¶
func (f *GodelSchedulerFramework) ListPlugins() map[string]sets.String
func (*GodelSchedulerFramework) RunFilterPlugins ¶
func (f *GodelSchedulerFramework) RunFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo framework.NodeInfo, skipPlugins ...string) framework.PluginToStatus
func (*GodelSchedulerFramework) RunPreFilterExtensionAddPod ¶
func (f *GodelSchedulerFramework) RunPreFilterExtensionAddPod( ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo framework.NodeInfo, ) (status *framework.Status)
RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured PreFilter plugins. It returns directly if any of the plugins return any status other than Success.
func (*GodelSchedulerFramework) RunPreFilterExtensionRemovePod ¶
func (f *GodelSchedulerFramework) RunPreFilterExtensionRemovePod( ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo framework.NodeInfo, ) (status *framework.Status)
RunPreFilterExtensionRemovePod calls the RemovePod interface for the set of configured PreFilter plugins. It returns directly if any of the plugins return any status other than Success.
func (*GodelSchedulerFramework) RunPreFilterPlugins ¶
func (f *GodelSchedulerFramework) RunPreFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status
func (*GodelSchedulerFramework) RunPreScorePlugins ¶
func (*GodelSchedulerFramework) RunScorePlugins ¶
func (f *GodelSchedulerFramework) RunScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeNames []string) (framework.PluginToNodeScores, *framework.Status)
func (*GodelSchedulerFramework) SetPotentialVictims ¶
func (f *GodelSchedulerFramework) SetPotentialVictims(node string, potentialVictims []string)
type GodelSchedulerPreemptionFramework ¶
type GodelSchedulerPreemptionFramework struct {
// contains filtered or unexported fields
}
GodelSchedulerPreemptionFramework is the component responsible for initializing and running scheduler plugins, determining plugins to run in each scheduling phase(or extension point)
func NewPreemptionFramework ¶
func NewPreemptionFramework(preemptionPluginRegistry framework.PluginMap, basePlugins *framework.PluginCollection, ) *GodelSchedulerPreemptionFramework
func (*GodelSchedulerPreemptionFramework) HasVictimSearchingPlugin ¶
func (f *GodelSchedulerPreemptionFramework) HasVictimSearchingPlugin(pluginName string) bool
func (*GodelSchedulerPreemptionFramework) ListPlugins ¶
func (f *GodelSchedulerPreemptionFramework) ListPlugins() map[string]sets.String
func (*GodelSchedulerPreemptionFramework) RunCandidatesSortingPlugins ¶
func (*GodelSchedulerPreemptionFramework) RunClusterPrePreemptingPlugins ¶
func (f *GodelSchedulerPreemptionFramework) RunClusterPrePreemptingPlugins(preemptor *v1.Pod, state, commonState *framework.CycleState) *framework.Status
func (*GodelSchedulerPreemptionFramework) RunNodePostPreemptingPlugins ¶
func (f *GodelSchedulerPreemptionFramework) RunNodePostPreemptingPlugins(preemptor *v1.Pod, victims []*v1.Pod, state, commonState *framework.CycleState) *framework.Status
func (*GodelSchedulerPreemptionFramework) RunNodePrePreemptingPlugins ¶
func (f *GodelSchedulerPreemptionFramework) RunNodePrePreemptingPlugins(preemptor *v1.Pod, nodeInfo framework.NodeInfo, state, preemptionState *framework.CycleState) *framework.Status
func (*GodelSchedulerPreemptionFramework) RunPostVictimSearchingPlugins ¶
func (f *GodelSchedulerPreemptionFramework) RunPostVictimSearchingPlugins(preemptor *v1.Pod, podInfo *framework.PodInfo, state, preemptionState *framework.CycleState, victimState *framework.VictimState) *framework.Status
func (*GodelSchedulerPreemptionFramework) RunVictimSearchingPlugins ¶
func (f *GodelSchedulerPreemptionFramework) RunVictimSearchingPlugins(preemptor *v1.Pod, podInfo *framework.PodInfo, state, preemptionState *framework.CycleState, victimState *framework.VictimState) (framework.Code, string)
type MetricsRecorder ¶
type MetricsRecorder struct {
// contains filtered or unexported fields
}
metricRecorder records framework metrics in a separate goroutine to avoid overhead in the critical path.
func NewMetricsRecorder ¶
func NewMetricsRecorder(bufferSize int, interval time.Duration, switchType framework.SwitchType, subCluster, schedulerName string) *MetricsRecorder
func (*MetricsRecorder) Close ¶
func (r *MetricsRecorder) Close()
type PluginsConstraint ¶
type PluginsConstraint struct {
// contains filtered or unexported fields
}