Documentation ¶
Index ¶
- type DelegatingSchedulerSharedLister
- func (lister *DelegatingSchedulerSharedLister) DeviceClasses() schedulerframework.DeviceClassLister
- func (lister *DelegatingSchedulerSharedLister) NodeInfos() schedulerframework.NodeInfoLister
- func (lister *DelegatingSchedulerSharedLister) ResetDelegate()
- func (lister *DelegatingSchedulerSharedLister) ResourceClaims() schedulerframework.ResourceClaimTracker
- func (lister *DelegatingSchedulerSharedLister) ResourceSlices() schedulerframework.ResourceSliceLister
- func (lister *DelegatingSchedulerSharedLister) StorageInfos() schedulerframework.StorageInfoLister
- func (lister *DelegatingSchedulerSharedLister) UpdateDelegate(delegate SharedLister)
- type Handle
- type 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 PodExtraInfo
- type PodInfo
- type SharedLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelegatingSchedulerSharedLister ¶
type DelegatingSchedulerSharedLister struct {
// contains filtered or unexported fields
}
DelegatingSchedulerSharedLister implements schedulerframework interfaces by passing the logic to a delegate. Delegate can be updated.
func NewDelegatingSchedulerSharedLister ¶
func NewDelegatingSchedulerSharedLister() *DelegatingSchedulerSharedLister
NewDelegatingSchedulerSharedLister creates new NewDelegatingSchedulerSharedLister
func (*DelegatingSchedulerSharedLister) DeviceClasses ¶
func (lister *DelegatingSchedulerSharedLister) DeviceClasses() schedulerframework.DeviceClassLister
DeviceClasses returns a DeviceClassLister.
func (*DelegatingSchedulerSharedLister) NodeInfos ¶
func (lister *DelegatingSchedulerSharedLister) NodeInfos() schedulerframework.NodeInfoLister
NodeInfos returns a NodeInfoLister.
func (*DelegatingSchedulerSharedLister) ResetDelegate ¶
func (lister *DelegatingSchedulerSharedLister) ResetDelegate()
ResetDelegate resets delegate to
func (*DelegatingSchedulerSharedLister) ResourceClaims ¶
func (lister *DelegatingSchedulerSharedLister) ResourceClaims() schedulerframework.ResourceClaimTracker
ResourceClaims returns a ResourceClaimTracker.
func (*DelegatingSchedulerSharedLister) ResourceSlices ¶
func (lister *DelegatingSchedulerSharedLister) ResourceSlices() schedulerframework.ResourceSliceLister
ResourceSlices returns a ResourceSliceLister.
func (*DelegatingSchedulerSharedLister) StorageInfos ¶
func (lister *DelegatingSchedulerSharedLister) StorageInfos() schedulerframework.StorageInfoLister
StorageInfos returns a StorageInfoLister
func (*DelegatingSchedulerSharedLister) UpdateDelegate ¶
func (lister *DelegatingSchedulerSharedLister) UpdateDelegate(delegate SharedLister)
UpdateDelegate updates the delegate
type Handle ¶
type Handle struct { Framework schedulerframework.Framework DelegatingLister *DelegatingSchedulerSharedLister }
Handle is meant for interacting with the scheduler framework.
func NewHandle ¶
func NewHandle(informerFactory informers.SharedInformerFactory, schedConfig *schedulerconfig.KubeSchedulerConfiguration, draEnabled bool) (*Handle, error)
NewHandle builds a framework Handle based on the provided informers and scheduler config.
func NewTestFrameworkHandle ¶
NewTestFrameworkHandle creates a Handle that can be used in tests.
func NewTestFrameworkHandleOrDie ¶
func NewTestFrameworkHandleOrDie(t testFailer) *Handle
NewTestFrameworkHandleOrDie creates a Handle that can be used in tests.
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, slices []*resourceapi.ResourceSlice, podExtraInfos map[types.UID]PodExtraInfo) *NodeInfo
WrapSchedulerNodeInfo wraps a *schedulerframework.NodeInfo into an internal *NodeInfo.
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 PodExtraInfo ¶
type PodExtraInfo struct { // NeededResourceClaims contains ResourceClaim objects needed by the Pod. NeededResourceClaims []*resourceapi.ResourceClaim }
PodExtraInfo contains all necessary information about a Pod that Cluster Autoscaler needs to track, apart from the Pod itself. This is extracted from PodInfo so that it can be stored separately from the Pod.
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 // PodExtraInfo is an embedded struct containing all additional information that CA needs to track about a Pod. PodExtraInfo }
PodInfo contains all necessary information about a Pod that Cluster Autoscaler needs to track.
func NewPodInfo ¶
func NewPodInfo(pod *apiv1.Pod, claims []*resourceapi.ResourceClaim) *PodInfo
NewPodInfo is a convenience function for creating new PodInfos without typing out the "PodExtraInfo" part.
type SharedLister ¶
type SharedLister interface { schedulerframework.SharedLister schedulerframework.SharedDRAManager }
SharedLister groups all interfaces that Cluster Autoscaler needs to implement for integrating with kube-scheduler.