plugin

package
v0.0.0-...-f2569be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBestFitScorePlugin

func NewBestFitScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewDotProductScorePlugin

func NewDotProductScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewFGDScorePlugin

func NewFGDScorePlugin(_ runtime.Object, handle framework.Handle, typicalPods *simontype.TargetPodList) (framework.Plugin, error)

func NewGpuClusteringScorePlugin

func NewGpuClusteringScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewGpuPackingScorePlugin

func NewGpuPackingScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewGpuSharePlugin

func NewGpuSharePlugin(configuration runtime.Object, handle framework.Handle, typicalPods *simontype.TargetPodList) (framework.Plugin, error)

func NewRandomScorePlugin

func NewRandomScorePlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewSimonPlugin

func NewSimonPlugin(configuration runtime.Object, handle framework.Handle) (framework.Plugin, error)

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) Score

func (plugin *BestFitScorePlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) (int64, *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) Score

func (plugin *DotProductScorePlugin) Score(ctx context.Context, state *framework.CycleState,
	p *v1.Pod, nodeName string) (int64, *framework.Status)

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) Score

func (plugin *FGDScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status)

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) Score

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) Score

func (plugin *GpuPackingScorePlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) (int64, *framework.Status)

func (*GpuPackingScorePlugin) ScoreExtensions

func (plugin *GpuPackingScorePlugin) ScoreExtensions() framework.ScoreExtensions

type GpuSharePlugin

type GpuSharePlugin struct {
	sync.RWMutex
	// 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) PodGet

func (plugin *GpuSharePlugin) PodGet(name string, namespace string) (*v1.Pod, 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) PreScore

func (plugin *RandomScorePlugin) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodes []*corev1.Node) *framework.Status

func (*RandomScorePlugin) Score

func (plugin *RandomScorePlugin) Score(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) (int64, *framework.Status)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL