package noderesources
import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources"
Index ¶
- Constants
- func NewBalancedAllocation(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error)
- func NewFit(_ *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error)
- func NewLeastAllocated(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error)
- func NewMostAllocated(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error)
- type BalancedAllocation
- func (ba *BalancedAllocation) Name() string
- func (ba *BalancedAllocation) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (ba *BalancedAllocation) ScoreExtensions() framework.ScoreExtensions
- type Fit
- func (f *Fit) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status
- func (f *Fit) Name() string
- type LeastAllocated
- func (la *LeastAllocated) Name() string
- func (la *LeastAllocated) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (la *LeastAllocated) ScoreExtensions() framework.ScoreExtensions
- type MostAllocated
Constants ¶
const BalancedAllocationName = "NodeResourcesBalancedAllocation"
BalancedAllocationName is the name of the plugin used in the plugin registry and configurations.
const FitName = "NodeResourcesFit"
FitName is the name of the plugin used in the plugin registry and configurations.
const LeastAllocatedName = "NodeResourcesLeastAllocated"
LeastAllocatedName is the name of the plugin used in the plugin registry and configurations.
const MostAllocatedName = "NodeResourcesMostAllocated"
MostAllocatedName is the name of the plugin used in the plugin registry and configurations.
Functions ¶
func NewBalancedAllocation ¶
func NewBalancedAllocation(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error)
NewBalancedAllocation initializes a new plugin and returns it.
func NewFit ¶
NewFit initializes a new plugin and returns it.
func NewLeastAllocated ¶
NewLeastAllocated initializes a new plugin and returns it.
func NewMostAllocated ¶
NewMostAllocated initializes a new plugin and returns it.
Types ¶
type BalancedAllocation ¶
type BalancedAllocation struct {
// contains filtered or unexported fields
}
BalancedAllocation is a score plugin that calculates the difference between the cpu and memory fraction of capacity, and prioritizes the host based on how close the two metrics are to each other.
func (*BalancedAllocation) Name ¶
func (ba *BalancedAllocation) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*BalancedAllocation) Score ¶
func (ba *BalancedAllocation) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*BalancedAllocation) ScoreExtensions ¶
func (ba *BalancedAllocation) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
type Fit ¶
type Fit struct{}
Fit is a plugin that checks if a node has sufficient resources.
func (*Fit) Filter ¶
func (f *Fit) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status
Filter invoked at the filter extension point.
func (*Fit) Name ¶
Name returns name of the plugin. It is used in logs, etc.
type LeastAllocated ¶
type LeastAllocated struct {
// contains filtered or unexported fields
}
LeastAllocated is a score plugin that favors nodes with fewer allocation requested resources based on requested resources.
func (*LeastAllocated) Name ¶
func (la *LeastAllocated) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*LeastAllocated) Score ¶
func (la *LeastAllocated) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*LeastAllocated) ScoreExtensions ¶
func (la *LeastAllocated) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
type MostAllocated ¶
type MostAllocated struct {
// contains filtered or unexported fields
}
MostAllocated is a score plugin that favors nodes with high allocation based on requested resources.
func (*MostAllocated) Name ¶
func (ma *MostAllocated) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*MostAllocated) Score ¶
func (ma *MostAllocated) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the Score extension point.
func (*MostAllocated) ScoreExtensions ¶
func (ma *MostAllocated) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Source Files ¶
balanced_allocation.go fit.go least_allocated.go most_allocated.go test_util.go
- Version
- v1.17.14
- Published
- Nov 11, 2020
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 4 minutes ago –
Tools for package owners.