Documentation
¶
Index ¶
- func GetCache() *extendedCache
- type NodeInfo
- func (n *NodeInfo) AddAssumedPod(pod *v1.Pod)
- func (n *NodeInfo) AddPod(key string, pod *v1.Pod)
- func (n *NodeInfo) DeleteAssumedPod(pod *v1.Pod)
- func (n *NodeInfo) GetResourceTopologyCopy(filterFn podFilter) *ResourceTopology
- func (n *NodeInfo) RemovePod(key string, pod *v1.Pod)
- func (n *NodeInfo) UpdateNodeInfo(cnr *apis.CustomNodeResource)
- type PodInfo
- type ResourceTopology
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
// node TopologyPolicy and TopologyZones from CNR status.
// is total CNR data necessary in extendedCache ?
ResourceTopology *ResourceTopology
// record assumed pod resource util pod is watched in CNR updated events.
AssumedPodResources native.PodResource
}
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) AddAssumedPod ¶ added in v0.4.0
func (*NodeInfo) DeleteAssumedPod ¶ added in v0.4.0
func (*NodeInfo) GetResourceTopologyCopy ¶ added in v0.4.0
func (n *NodeInfo) GetResourceTopologyCopy(filterFn podFilter) *ResourceTopology
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.
type ResourceTopology ¶ added in v0.4.0
type ResourceTopology struct {
TopologyZone []*v1alpha1.TopologyZone
TopologyPolicy v1alpha1.TopologyPolicy
}
func (*ResourceTopology) DeepCopy ¶ added in v0.4.0
func (rt *ResourceTopology) DeepCopy() *ResourceTopology
func (*ResourceTopology) Update ¶ added in v0.4.0
func (rt *ResourceTopology) Update(cnr *v1alpha1.CustomNodeResource)
func (*ResourceTopology) WithPodReousrce ¶ added in v0.4.0
func (rt *ResourceTopology) WithPodReousrce(podResource native.PodResource, filter podFilter) *ResourceTopology
WithPodReousrce add assumedPodResource to ResourceTopology, performing pessimistic overallocation across all the NUMA zones.
Click to show internal directories.
Click to hide internal directories.