Documentation ¶
Index ¶
- type NodeInfo
- func NewNodeInfo(node *apiv1.Node, slices []*resourceapi.ResourceSlice, pods ...*PodInfo) *NodeInfo
- func NewTestNodeInfo(node *apiv1.Node, pods ...*apiv1.Pod) *NodeInfo
- func WrapSchedulerNodeInfo(schedNodeInfo *schedulerframework.NodeInfo) *NodeInfo
- func WrapSchedulerNodeInfos(schedNodeInfos []*schedulerframework.NodeInfo) []*NodeInfo
- func (n *NodeInfo) AddPod(pod *PodInfo)
- func (n *NodeInfo) DeepCopy() *NodeInfo
- func (n *NodeInfo) Node() *apiv1.Node
- func (n *NodeInfo) Pods() []*PodInfo
- func (n *NodeInfo) RemovePod(pod *apiv1.Pod) error
- func (n *NodeInfo) SetNode(node *apiv1.Node)
- func (n *NodeInfo) ToScheduler() *schedulerframework.NodeInfo
- type PodInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeInfo ¶
type NodeInfo struct { // LocalResourceSlices contains all node-local ResourceSlices exposed by this Node. LocalResourceSlices []*resourceapi.ResourceSlice // contains filtered or unexported fields }
NodeInfo contains all necessary information about a Node that Cluster Autoscaler needs to track. It's essentially a wrapper around schedulerframework.NodeInfo, with extra data on top.
func NewNodeInfo ¶
func NewNodeInfo(node *apiv1.Node, slices []*resourceapi.ResourceSlice, pods ...*PodInfo) *NodeInfo
NewNodeInfo returns a new internal NodeInfo from the provided data.
func NewTestNodeInfo ¶
NewTestNodeInfo returns a new NodeInfo without any DRA information - only to be used in test code. Production code should always take DRA objects into account.
func WrapSchedulerNodeInfo ¶
func WrapSchedulerNodeInfo(schedNodeInfo *schedulerframework.NodeInfo) *NodeInfo
WrapSchedulerNodeInfo wraps a *schedulerframework.NodeInfo into an internal *NodeInfo.
func WrapSchedulerNodeInfos ¶
func WrapSchedulerNodeInfos(schedNodeInfos []*schedulerframework.NodeInfo) []*NodeInfo
WrapSchedulerNodeInfos wraps a list of *schedulerframework.NodeInfos into internal *NodeInfos.
func (*NodeInfo) Pods ¶
Pods returns the Pods scheduled on this NodeInfo, along with all their associated data.
func (*NodeInfo) RemovePod ¶
RemovePod removes the given pod and its associated data from the NodeInfo.
func (*NodeInfo) ToScheduler ¶
func (n *NodeInfo) ToScheduler() *schedulerframework.NodeInfo
ToScheduler returns the embedded *schedulerframework.NodeInfo portion of the tracked data.
type PodInfo ¶
type PodInfo struct { // This type embeds *apiv1.Pod to make the accesses easier - most of the code just needs to access the Pod. *apiv1.Pod // NeededResourceClaims contains ResourceClaim objects needed by the Pod. NeededResourceClaims []*resourceapi.ResourceClaim }
PodInfo contains all necessary information about a Pod that Cluster Autoscaler needs to track.