Documentation ¶
Index ¶
- func ComputePodGroupResources(n *types.NodeInfo, spec *types.PodInfo, bRemovePod bool) (podResources types.ResourceList, updatedUsedByNode types.ResourceList)
- func PodClearAllocateFrom(spec *types.PodInfo)
- func PodFitsGroupConstraints(n *types.NodeInfo, spec *types.PodInfo, allocating bool) (bool, []sctypes.PredicateFailureReason, float64)
- func ReturnPodGroupResource(n *types.NodeInfo, spec *types.PodInfo)
- func TakePodGroupResource(n *types.NodeInfo, spec *types.PodInfo)
- type GrpAllocator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePodGroupResources ¶
func ComputePodGroupResources(n *types.NodeInfo, spec *types.PodInfo, bRemovePod bool) ( podResources types.ResourceList, updatedUsedByNode types.ResourceList)
ComputePodGroupResources returns resources needed by pod & updated node resources
func PodClearAllocateFrom ¶
func PodFitsGroupConstraints ¶
func PodFitsGroupConstraints(n *types.NodeInfo, spec *types.PodInfo, allocating bool) (bool, []sctypes.PredicateFailureReason, float64)
PodFitsGroupConstraints tells if pod fits constraints, score returned is score of running containers
func ReturnPodGroupResource ¶
ReturnPodGroupResource returns pod resource to node, pod removed
Types ¶
type GrpAllocator ¶
type GrpAllocator struct { // Global read info for all ContName string InitContainer bool PreferUsed bool // required resource and scorer RequiredResource map[string]int64 ReqScorer map[string]scorer.ResourceScoreFunc // allocatable resource and scorer AllocResource map[string]int64 AllocScorer map[string]scorer.ResourceScoreFunc // Global read/write info UsedGroups map[string]bool // Per group info, read only // Resource Info - required GrpRequiredResource map[string]string IsReqSubGrp map[string]bool // Resource Info - allocatable GrpAllocResource map[string](map[string]string) IsAllocSubGrp map[string]bool // other nodeinfo ReqBaseGroupName string AllocBaseGroupPrefix string // Used Info, write as group is explored Score float64 PodResource map[string]int64 NodeResource map[string]int64 AllocateFrom map[string]string }
GrpAllocator is the type to perform group allocations
Click to show internal directories.
Click to hide internal directories.