Documentation
¶
Index ¶
Constants ¶
View Source
const ErrReasonTooManyPods = "node(s) had too many pods"
Variables ¶
This section is empty.
Functions ¶
Types ¶
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.
func FitsRequest ¶
func FitsRequest(podRequest *PodRequest, nodeInfo framework.NodeInfo, ignoredExtendedResources, ignoredResourceGroups sets.String) *InsufficientResource
type PodRequest ¶
type PodRequest struct { framework.Resource ResourceType podutil.PodResourceType IgnorePodsLimit bool Err error }
PodRequest computed at PreFilter and used at Filter.
func ComputePodResourceRequest ¶
func ComputePodResourceRequest(pod *v1.Pod) *PodRequest
ComputePodResourceRequest returns a framework.Resource that covers the largest width in each resource dimension. Because init-containers run sequentially, we collect the max in each dimension iteratively. In contrast, we sum the resource vectors for regular containers since they run simultaneously.
Example:
Pod:
InitContainers IC1: CPU: 2 Memory: 1G IC2: CPU: 2 Memory: 3G Containers C1: CPU: 2 Memory: 1G C2: CPU: 1 Memory: 1G
Result: CPU: 3, Memory: 3G
Click to show internal directories.
Click to hide internal directories.