Documentation
¶
Index ¶
- func NewBestFitScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewDotProductScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewFGDScorePlugin(_ runtime.Object, handle framework.Handle, ...) (framework.Plugin, error)
- func NewGpuClusteringScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewGpuPackingScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewGpuSharePlugin(configuration runtime.Object, handle framework.Handle, ...) (framework.Plugin, error)
- func NewRandomScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewSimonPlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NormalizeScore(scores framework.NodeScoreList) *framework.Status
- func PreFilterFragGpuRatio(nodeInfoList []*framework.NodeInfo, typicalPods simontype.TargetPodList) (float64, *framework.Status)
- type BestFitScorePlugin
- func (plugin *BestFitScorePlugin) Name() string
- func (plugin *BestFitScorePlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, p *corev1.Pod, ...) *framework.Status
- func (plugin *BestFitScorePlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) (int64, *framework.Status)
- func (plugin *BestFitScorePlugin) ScoreExtensions() framework.ScoreExtensions
- type DotProductScorePlugin
- type FGDScorePlugin
- type GpuClusteringScorePlugin
- type GpuPackingScorePlugin
- type GpuSharePlugin
- func (plugin *GpuSharePlugin) ExportGpuNodeInfoAsNodeGpuInfo(nodeName string) (*gpusharecache.GpuNodeInfoStr, error)
- func (plugin *GpuSharePlugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (plugin *GpuSharePlugin) Name() string
- func (plugin *GpuSharePlugin) NodeGet(name string) (*v1.Node, error)
- func (plugin *GpuSharePlugin) PodGet(name string, namespace string) (*v1.Pod, error)
- func (plugin *GpuSharePlugin) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (plugin *GpuSharePlugin) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
- type RandomScorePlugin
- func (plugin *RandomScorePlugin) Name() string
- func (plugin *RandomScorePlugin) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (plugin *RandomScorePlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) (int64, *framework.Status)
- func (plugin *RandomScorePlugin) ScoreExtensions() framework.ScoreExtensions
- type SimonPlugin
- func (plugin *SimonPlugin) Bind(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (plugin *SimonPlugin) BindPodToNode(ctx context.Context, state *framework.CycleState, p *corev1.Pod, ...) *framework.Status
- func (plugin *SimonPlugin) Name() string
- func (plugin *SimonPlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (plugin *SimonPlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) (int64, *framework.Status)
- func (plugin *SimonPlugin) ScoreExtensions() framework.ScoreExtensions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBestFitScorePlugin ¶
func NewFGDScorePlugin ¶
func NewGpuSharePlugin ¶
func NewRandomScorePlugin ¶
func NewSimonPlugin ¶
func NormalizeScore ¶
func NormalizeScore(scores framework.NodeScoreList) *framework.Status
NormalizeScore in Score Extension.
Reused by all plugins whose scores might go beyond 0(framework.MinNodeScore)--100(framework.MaxNodeScore)
func PreFilterFragGpuRatio ¶
func PreFilterFragGpuRatio(nodeInfoList []*framework.NodeInfo, typicalPods simontype.TargetPodList) (float64, *framework.Status)
PreFilterFragGpuRatio return the fragGpuRatio (0.0-1.0) of the current cluster,
i.e., how many of the idle GPUs are fragment. Its output should be cached to plugin.fragGpuRatio to avoid re-computation. It should be called before filter to avoid the change of visible nodes.
Types ¶
type BestFitScorePlugin ¶
type BestFitScorePlugin struct {
// contains filtered or unexported fields
}
func (*BestFitScorePlugin) Name ¶
func (plugin *BestFitScorePlugin) Name() string
func (*BestFitScorePlugin) NormalizeScore ¶
func (plugin *BestFitScorePlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, p *corev1.Pod, scores framework.NodeScoreList) *framework.Status
func (*BestFitScorePlugin) ScoreExtensions ¶
func (plugin *BestFitScorePlugin) ScoreExtensions() framework.ScoreExtensions
type DotProductScorePlugin ¶
type DotProductScorePlugin struct {
// contains filtered or unexported fields
}
DotProductScorePlugin implements the packing heuristics proposed by Tetris. https://dl.acm.org/doi/10.1145/2619239.2626334
func (*DotProductScorePlugin) Name ¶
func (plugin *DotProductScorePlugin) Name() string
func (*DotProductScorePlugin) ScoreExtensions ¶
func (plugin *DotProductScorePlugin) ScoreExtensions() framework.ScoreExtensions
type FGDScorePlugin ¶
type FGDScorePlugin struct {
// contains filtered or unexported fields
}
func (*FGDScorePlugin) Name ¶
func (plugin *FGDScorePlugin) Name() string
func (*FGDScorePlugin) ScoreExtensions ¶
func (plugin *FGDScorePlugin) ScoreExtensions() framework.ScoreExtensions
type GpuClusteringScorePlugin ¶
type GpuClusteringScorePlugin struct {
// contains filtered or unexported fields
}
func (*GpuClusteringScorePlugin) Name ¶
func (plugin *GpuClusteringScorePlugin) Name() string
func (*GpuClusteringScorePlugin) ScoreExtensions ¶
func (plugin *GpuClusteringScorePlugin) ScoreExtensions() framework.ScoreExtensions
type GpuPackingScorePlugin ¶
type GpuPackingScorePlugin struct {
// contains filtered or unexported fields
}
func (*GpuPackingScorePlugin) Name ¶
func (plugin *GpuPackingScorePlugin) Name() string
func (*GpuPackingScorePlugin) ScoreExtensions ¶
func (plugin *GpuPackingScorePlugin) ScoreExtensions() framework.ScoreExtensions
type GpuSharePlugin ¶
type GpuSharePlugin struct { // contains filtered or unexported fields }
GpuSharePlugin is a plugin for scheduling framework
func (*GpuSharePlugin) ExportGpuNodeInfoAsNodeGpuInfo ¶
func (plugin *GpuSharePlugin) ExportGpuNodeInfoAsNodeGpuInfo(nodeName string) (*gpusharecache.GpuNodeInfoStr, error)
func (*GpuSharePlugin) Filter ¶
func (plugin *GpuSharePlugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter Plugin Filter filters out non-allocatable nodes
func (*GpuSharePlugin) Name ¶
func (plugin *GpuSharePlugin) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*GpuSharePlugin) NodeGet ¶
func (plugin *GpuSharePlugin) NodeGet(name string) (*v1.Node, error)
func (*GpuSharePlugin) Reserve ¶
func (plugin *GpuSharePlugin) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
Reserve Plugin Reserve updates the GPU resource of the given node, according to the pod's request.
func (*GpuSharePlugin) Unreserve ¶
func (plugin *GpuSharePlugin) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
Unreserve undoes the GPU resource updated in Reserve function.
type RandomScorePlugin ¶
type RandomScorePlugin struct {
// contains filtered or unexported fields
}
func (*RandomScorePlugin) Name ¶
func (plugin *RandomScorePlugin) Name() string
func (*RandomScorePlugin) ScoreExtensions ¶
func (plugin *RandomScorePlugin) ScoreExtensions() framework.ScoreExtensions
type SimonPlugin ¶
type SimonPlugin struct {
// contains filtered or unexported fields
}
SimonPlugin is a plugin for scheduling framework
func (*SimonPlugin) Bind ¶
func (plugin *SimonPlugin) Bind(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status
Bind invoked at the bind extension point.
func (*SimonPlugin) BindPodToNode ¶
func (plugin *SimonPlugin) BindPodToNode(ctx context.Context, state *framework.CycleState, p *corev1.Pod, nodeName string) *framework.Status
BindPodToNode bind pod to a node and trigger pod update event
func (*SimonPlugin) Name ¶
func (plugin *SimonPlugin) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*SimonPlugin) NormalizeScore ¶
func (plugin *SimonPlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, scores framework.NodeScoreList) *framework.Status
NormalizeScore invoked after scoring all nodes.
func (*SimonPlugin) Score ¶
func (plugin *SimonPlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*SimonPlugin) ScoreExtensions ¶
func (plugin *SimonPlugin) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.