Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NodeInfo ¶
type NodeInfo struct {
// Mutex guards all fields within this NodeInfo struct.
Mutex sync.RWMutex
// Total requested qos resources of this node. This includes assumed
// pods, which scheduler has sent for binding, but may not be scheduled yet.
QoSResourcesRequested *native.QoSResource
// Total requested qos resources of this node with a minimum value
// applied to each container's CPU and memory requests. This does not reflect
// the actual resource requests for this node, but is used to avoid scheduling
// many zero-request pods onto one node.
QoSResourcesNonZeroRequested *native.QoSResource
// We store qos allocatedResources (which is CNR.Status.BestEffortResourceAllocatable.*) explicitly
// as int64, to avoid conversions and accessing map.
QoSResourcesAllocatable *native.QoSResource
// record PodInfo here since we may have the functionality to
// change pod resources.
Pods map[string]*PodInfo
}
NodeInfo is node level aggregated information.
func NewNodeInfo ¶
func NewNodeInfo() *NodeInfo
NewNodeInfo returns a ready to use empty NodeInfo object. If any pods are given in arguments, their information will be aggregated in the returned object.
func (*NodeInfo) UpdateNodeInfo ¶
func (n *NodeInfo) UpdateNodeInfo(cnr *apis.CustomNodeResource)
UpdateNodeInfo updates the NodeInfo.
type PodInfo ¶
type PodInfo struct {
QoSResourcesRequested *native.QoSResource
QoSResourcesNonZeroRequested *native.QoSResource
}
PodInfo is pod level aggregated information.
Click to show internal directories.
Click to hide internal directories.