Documentation
¶
Index ¶
- Constants
- type CommonStoresSwitch
- type RangeFunc
- type ReschedulerCache
- func (cache *ReschedulerCache) AddCNR(cnr *katalystv1alpha1.CustomNodeResource) error
- func (cache *ReschedulerCache) AddMovement(movement *schedulingv1a1.Movement) error
- func (cache *ReschedulerCache) AddNMNode(nmNode *nodev1alpha1.NMNode) error
- func (cache *ReschedulerCache) AddNode(node *v1.Node) error
- func (cache *ReschedulerCache) AddOwner(ownerType, key string, labels map[string]string) error
- func (cache *ReschedulerCache) AddPDB(pdb *policy.PodDisruptionBudget) error
- func (cache *ReschedulerCache) AddPod(pod *v1.Pod) error
- func (cache *ReschedulerCache) AddPodGroup(podGroup *schedulingv1a1.PodGroup) error
- func (cache *ReschedulerCache) AssumePod(podInfo *api.CachePodInfo) error
- func (cache *ReschedulerCache) DeleteOwner(ownerType, key string) error
- func (cache *ReschedulerCache) DeletePDB(pdb *policy.PodDisruptionBudget) error
- func (cache *ReschedulerCache) GetPod(key string) (*v1.Pod, error)
- func (cache *ReschedulerCache) RemoveCNR(cnr *katalystv1alpha1.CustomNodeResource) error
- func (cache *ReschedulerCache) RemoveMovement(movement *schedulingv1a1.Movement) error
- func (cache *ReschedulerCache) RemoveNMNode(nmNode *nodev1alpha1.NMNode) error
- func (cache *ReschedulerCache) RemoveNode(node *v1.Node) error
- func (cache *ReschedulerCache) RemovePod(pod *v1.Pod) error
- func (cache *ReschedulerCache) RemovePodGroup(podGroup *schedulingv1a1.PodGroup) error
- func (cache *ReschedulerCache) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error
- func (cache *ReschedulerCache) UpdateMovement(oldMovement, newMovement *schedulingv1a1.Movement) error
- func (cache *ReschedulerCache) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error
- func (cache *ReschedulerCache) UpdateNode(oldNode, newNode *v1.Node) error
- func (cache *ReschedulerCache) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error
- func (cache *ReschedulerCache) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error
- func (cache *ReschedulerCache) UpdatePod(oldPod, newPod *v1.Pod) error
- func (cache *ReschedulerCache) UpdatePodGroup(oldPodGroup, newPodGroup *schedulingv1a1.PodGroup) error
- func (cache *ReschedulerCache) UpdateSnapshot(snapshot *ReschedulingSnapshot) error
- func (cache *ReschedulerCache) UpdateSnapshots(snapshotLister *ReschedulingSnapshotLister) error
- type ReschedulingSnapshot
- func (s *ReschedulingSnapshot) AssumePod(pod *v1.Pod, gpuBinPacking bool, storeType string) error
- func (s *ReschedulingSnapshot) CheckMovementItem(previousNode, targetNode string, instance *v1.Pod, storeType string) (string, policies.CheckResult)
- func (gs *ReschedulingSnapshot) FindStore(storeName commonstore.StoreName) commonstore.Store
- func (s *ReschedulingSnapshot) Get(nodeName string) (schedulerframework.NodeInfo, error)
- func (s *ReschedulingSnapshot) GetNodeInfo(nodeName string) (schedulerframework.NodeInfo, error)
- func (s *ReschedulingSnapshot) GetOwnerLabels(ownerType, ownerKey string) map[string]string
- func (s *ReschedulingSnapshot) GetPDBItemList() []schedulerframework.PDBItem
- func (s *ReschedulingSnapshot) GetPDBItemListForOwner(ownerType, ownerKey string) (bool, bool, []string)
- func (s *ReschedulingSnapshot) GetPendingPods() map[string]int
- func (s *ReschedulingSnapshot) GetPodGroupInfo(podGroupName string) (*schedulingv1a1.PodGroup, error)
- func (s *ReschedulingSnapshot) GetReschedulingItemsForGroupThrottle(throttleItems []config.ThrottleItem) map[string]map[string][]*throttlestore.InstanceItem
- func (s *ReschedulingSnapshot) GetReschedulingItemsForPodThrottle(throttleItems []config.ThrottleItem) map[string]map[string][]*throttlestore.InstanceItem
- func (s *ReschedulingSnapshot) GetSchedulerSnapshot() *cache.Snapshot
- func (s *ReschedulingSnapshot) List() []schedulerframework.NodeInfo
- func (s *ReschedulingSnapshot) NodeInfos() schedulerframework.NodeInfoLister
- func (s *ReschedulingSnapshot) NodeInfosInScope(nodeSelector map[string]string) []schedulerframework.NodeInfo
- func (s *ReschedulingSnapshot) RemovePod(pod *v1.Pod, storeType string) error
- func (s *ReschedulingSnapshot) SnapshotSharedLister() schedulerframework.SharedLister
- func (s *ReschedulingSnapshot) SyncPolicyStore(policyName string, policyStore policies.PolicyStore, storeType string)
- type ReschedulingSnapshotLister
Constants ¶
View Source
const ( DetectorStore string = "DetectorStore" AlgorithmStore string = "AlgorithmStore" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonStoresSwitch ¶
type CommonStoresSwitch struct {
Stores []reschedulercommonstores.CommonStore
}
func (*CommonStoresSwitch) Find ¶
func (s *CommonStoresSwitch) Find(name reschedulercommonstores.StoreName) reschedulercommonstores.CommonStore
func (*CommonStoresSwitch) Range ¶
func (s *CommonStoresSwitch) Range(f RangeFunc) error
func (*CommonStoresSwitch) String ¶
func (s *CommonStoresSwitch) String() string
type RangeFunc ¶
type RangeFunc func(reschedulercommonstores.CommonStore) error
type ReschedulerCache ¶
type ReschedulerCache struct {
// contains filtered or unexported fields
}
func New ¶
func New(handler commoncache.CacheHandler) *ReschedulerCache
func (*ReschedulerCache) AddCNR ¶
func (cache *ReschedulerCache) AddCNR(cnr *katalystv1alpha1.CustomNodeResource) error
func (*ReschedulerCache) AddMovement ¶
func (cache *ReschedulerCache) AddMovement(movement *schedulingv1a1.Movement) error
func (*ReschedulerCache) AddNMNode ¶
func (cache *ReschedulerCache) AddNMNode(nmNode *nodev1alpha1.NMNode) error
func (*ReschedulerCache) AddOwner ¶
func (cache *ReschedulerCache) AddOwner(ownerType, key string, labels map[string]string) error
func (*ReschedulerCache) AddPDB ¶
func (cache *ReschedulerCache) AddPDB(pdb *policy.PodDisruptionBudget) error
func (*ReschedulerCache) AddPodGroup ¶
func (cache *ReschedulerCache) AddPodGroup(podGroup *schedulingv1a1.PodGroup) error
func (*ReschedulerCache) AssumePod ¶
func (cache *ReschedulerCache) AssumePod(podInfo *api.CachePodInfo) error
func (*ReschedulerCache) DeleteOwner ¶
func (cache *ReschedulerCache) DeleteOwner(ownerType, key string) error
func (*ReschedulerCache) DeletePDB ¶
func (cache *ReschedulerCache) DeletePDB(pdb *policy.PodDisruptionBudget) error
func (*ReschedulerCache) GetPod ¶
func (cache *ReschedulerCache) GetPod(key string) (*v1.Pod, error)
func (*ReschedulerCache) RemoveCNR ¶
func (cache *ReschedulerCache) RemoveCNR(cnr *katalystv1alpha1.CustomNodeResource) error
RemoveCNR removes custom node resource. The node might be still in the node tree because their deletion events didn't arrive yet.
func (*ReschedulerCache) RemoveMovement ¶
func (cache *ReschedulerCache) RemoveMovement(movement *schedulingv1a1.Movement) error
func (*ReschedulerCache) RemoveNMNode ¶
func (cache *ReschedulerCache) RemoveNMNode(nmNode *nodev1alpha1.NMNode) error
func (*ReschedulerCache) RemoveNode ¶
func (cache *ReschedulerCache) RemoveNode(node *v1.Node) error
RemoveNode removes a node from the cache's tree. The node might still have pods because their deletion events didn't arrive yet. Those pods are considered removed from the cache, being the node tree the source of truth. However, we keep a ghost node with the list of pods until all pod deletion events have arrived. A ghost node is skipped from snapshots.
func (*ReschedulerCache) RemovePodGroup ¶
func (cache *ReschedulerCache) RemovePodGroup(podGroup *schedulingv1a1.PodGroup) error
func (*ReschedulerCache) UpdateCNR ¶
func (cache *ReschedulerCache) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error
func (*ReschedulerCache) UpdateMovement ¶
func (cache *ReschedulerCache) UpdateMovement(oldMovement, newMovement *schedulingv1a1.Movement) error
func (*ReschedulerCache) UpdateNMNode ¶
func (cache *ReschedulerCache) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error
func (*ReschedulerCache) UpdateNode ¶
func (cache *ReschedulerCache) UpdateNode(oldNode, newNode *v1.Node) error
func (*ReschedulerCache) UpdateOwner ¶
func (cache *ReschedulerCache) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error
func (*ReschedulerCache) UpdatePDB ¶
func (cache *ReschedulerCache) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error
func (*ReschedulerCache) UpdatePod ¶
func (cache *ReschedulerCache) UpdatePod(oldPod, newPod *v1.Pod) error
func (*ReschedulerCache) UpdatePodGroup ¶
func (cache *ReschedulerCache) UpdatePodGroup(oldPodGroup, newPodGroup *schedulingv1a1.PodGroup) error
func (*ReschedulerCache) UpdateSnapshot ¶
func (cache *ReschedulerCache) UpdateSnapshot(snapshot *ReschedulingSnapshot) error
func (*ReschedulerCache) UpdateSnapshots ¶
func (cache *ReschedulerCache) UpdateSnapshots(snapshotLister *ReschedulingSnapshotLister) error
type ReschedulingSnapshot ¶
type ReschedulingSnapshot struct {
// contains filtered or unexported fields
}
func NewEmptySnapshot ¶
func NewEmptySnapshot(handler commoncache.CacheHandler) *ReschedulingSnapshot
func (*ReschedulingSnapshot) CheckMovementItem ¶
func (s *ReschedulingSnapshot) CheckMovementItem(previousNode, targetNode string, instance *v1.Pod, storeType string) (string, policies.CheckResult)
func (*ReschedulingSnapshot) FindStore ¶
func (gs *ReschedulingSnapshot) FindStore(storeName commonstore.StoreName) commonstore.Store
func (*ReschedulingSnapshot) Get ¶
func (s *ReschedulingSnapshot) Get(nodeName string) (schedulerframework.NodeInfo, error)
func (*ReschedulingSnapshot) GetNodeInfo ¶
func (s *ReschedulingSnapshot) GetNodeInfo(nodeName string) (schedulerframework.NodeInfo, error)
func (*ReschedulingSnapshot) GetOwnerLabels ¶
func (s *ReschedulingSnapshot) GetOwnerLabels(ownerType, ownerKey string) map[string]string
func (*ReschedulingSnapshot) GetPDBItemList ¶
func (s *ReschedulingSnapshot) GetPDBItemList() []schedulerframework.PDBItem
func (*ReschedulingSnapshot) GetPDBItemListForOwner ¶
func (s *ReschedulingSnapshot) GetPDBItemListForOwner(ownerType, ownerKey string) (bool, bool, []string)
func (*ReschedulingSnapshot) GetPendingPods ¶
func (s *ReschedulingSnapshot) GetPendingPods() map[string]int
func (*ReschedulingSnapshot) GetPodGroupInfo ¶
func (s *ReschedulingSnapshot) GetPodGroupInfo(podGroupName string) (*schedulingv1a1.PodGroup, error)
func (*ReschedulingSnapshot) GetReschedulingItemsForGroupThrottle ¶
func (s *ReschedulingSnapshot) GetReschedulingItemsForGroupThrottle(throttleItems []config.ThrottleItem) map[string]map[string][]*throttlestore.InstanceItem
func (*ReschedulingSnapshot) GetReschedulingItemsForPodThrottle ¶
func (s *ReschedulingSnapshot) GetReschedulingItemsForPodThrottle(throttleItems []config.ThrottleItem) map[string]map[string][]*throttlestore.InstanceItem
func (*ReschedulingSnapshot) GetSchedulerSnapshot ¶
func (s *ReschedulingSnapshot) GetSchedulerSnapshot() *cache.Snapshot
func (*ReschedulingSnapshot) List ¶
func (s *ReschedulingSnapshot) List() []schedulerframework.NodeInfo
func (*ReschedulingSnapshot) NodeInfos ¶
func (s *ReschedulingSnapshot) NodeInfos() schedulerframework.NodeInfoLister
func (*ReschedulingSnapshot) NodeInfosInScope ¶
func (s *ReschedulingSnapshot) NodeInfosInScope(nodeSelector map[string]string) []schedulerframework.NodeInfo
func (*ReschedulingSnapshot) RemovePod ¶
func (s *ReschedulingSnapshot) RemovePod(pod *v1.Pod, storeType string) error
func (*ReschedulingSnapshot) SnapshotSharedLister ¶
func (s *ReschedulingSnapshot) SnapshotSharedLister() schedulerframework.SharedLister
func (*ReschedulingSnapshot) SyncPolicyStore ¶
func (s *ReschedulingSnapshot) SyncPolicyStore(policyName string, policyStore policies.PolicyStore, storeType string)
type ReschedulingSnapshotLister ¶
type ReschedulingSnapshotLister struct {
// contains filtered or unexported fields
}
func NewReschedulingSnapshotLister ¶
func NewReschedulingSnapshotLister(size int, informerFactory informers.SharedInformerFactory, crdInformerFactory crdinformers.SharedInformerFactory) *ReschedulingSnapshotLister
func (*ReschedulingSnapshotLister) Pop ¶
func (snapshotLister *ReschedulingSnapshotLister) Pop() *ReschedulingSnapshot
Click to show internal directories.
Click to hide internal directories.