Documentation ¶
Index ¶
Constants ¶
View Source
const (
// FitName is the name of the plugin used in the plugin registry and configurations.
FitName = "NodeResourcesFit"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fit ¶
type Fit struct {
// contains filtered or unexported fields
}
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 *framework.NodeInfo) *framework.Status
Filter invoked at the filter extension point. Checks if a node has sufficient resources, such as cpu, memory, gpu, opaque int resources etc to run a pod. It returns a list of insufficient resources, if empty, then the node has all the resources requested by the pod.
type InsufficientResource ¶
type InsufficientResource struct { ResourceName v1.ResourceName // We explicitly have a parameter for reason to avoid formatting a message on the fly // for common resources, which is expensive for cluster autoscaler simulations. Reason string Requested int64 Used int64 Capacity int64 }
InsufficientResource describes what kind of resource limit is hit and caused the pod to not fit the node.
Click to show internal directories.
Click to hide internal directories.