cache

package
v0.0.0-...-7cb1e0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

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) Range

func (s *CommonStoresSwitch) Range(f RangeFunc) error

func (*CommonStoresSwitch) String

func (s *CommonStoresSwitch) String() string

type ReschedulerCache

type ReschedulerCache struct {
	// contains filtered or unexported fields
}

func New

func (*ReschedulerCache) AddCNR

func (*ReschedulerCache) AddMovement

func (cache *ReschedulerCache) AddMovement(movement *schedulingv1a1.Movement) error

func (*ReschedulerCache) AddNMNode

func (cache *ReschedulerCache) AddNMNode(nmNode *nodev1alpha1.NMNode) error

func (*ReschedulerCache) AddNode

func (cache *ReschedulerCache) AddNode(node *v1.Node) 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) AddPod

func (cache *ReschedulerCache) AddPod(pod *v1.Pod) 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

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) RemovePod

func (cache *ReschedulerCache) RemovePod(pod *v1.Pod) error

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) AssumePod

func (s *ReschedulingSnapshot) AssumePod(pod *v1.Pod, gpuBinPacking bool, storeType string) error

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 (*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 (*ReschedulingSnapshot) NodeInfos

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL