Documentation
¶
Index ¶
- Constants
- func LoadPolicyFromFile(file string) (*policy.DynamicSchedulerPolicy, error)
- func NewDynamicScheduler(plArgs runtime.Object, h framework.Handle) (framework.Plugin, error)
- type DynamicScheduler
- func (ds *DynamicScheduler) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (ds *DynamicScheduler) Name() string
- func (ds *DynamicScheduler) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status)
- func (ds *DynamicScheduler) ScoreExtensions() framework.ScoreExtensions
Constants ¶
View Source
const ( // MinTimestampStrLength defines the min length of timestamp string. MinTimestampStrLength = 5 // NodeHotValue is the key of hot value annotation. NodeHotValue = "node_hot_value" // DefautlHotVauleActivePeriod defines the validity period of nodes' hotvalue. DefautlHotVauleActivePeriod = 5 * time.Minute // ExtraActivePeriod gives extra active time to the annotation. ExtraActivePeriod = 5 * time.Minute )
View Source
const (
// Name is the name of the plugin used in the plugin registry and configurations.
Name = "Dynamic"
)
Variables ¶
This section is empty.
Functions ¶
func LoadPolicyFromFile ¶
func LoadPolicyFromFile(file string) (*policy.DynamicSchedulerPolicy, error)
Types ¶
type DynamicScheduler ¶
type DynamicScheduler struct {
// contains filtered or unexported fields
}
Dynamic-scheduler is a real load-aware scheduler plugin.
func (*DynamicScheduler) Filter ¶
func (ds *DynamicScheduler) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter invoked at the filter extension point. checkes if the real load of one node is too high. It returns a list of failure reasons if the node is overload.
func (*DynamicScheduler) Name ¶
func (ds *DynamicScheduler) Name() string
Name returns name of the plugin.
func (*DynamicScheduler) Score ¶
func (ds *DynamicScheduler) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the Score extension point. It gets metric data from node annotation, and favors nodes with the least real resource usage.
func (*DynamicScheduler) ScoreExtensions ¶
func (ds *DynamicScheduler) ScoreExtensions() framework.ScoreExtensions
Click to show internal directories.
Click to hide internal directories.