Documentation
¶
Overview ¶
Package allocation handles tracking pod resource allocations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // GetContainerResourceAllocation returns the AllocatedResources value for the container GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceRequirements, bool) // UpdatePodFromAllocation overwrites the pod spec with the allocation. // This function does a deep copy only if updates are needed. // Returns the updated (or original) pod, and whether there was an allocation stored. UpdatePodFromAllocation(pod *v1.Pod) (*v1.Pod, bool) // SetPodAllocation checkpoints the resources allocated to a pod's containers. SetPodAllocation(pod *v1.Pod) error // DeletePodAllocation removes any stored state for the given pod UID. DeletePodAllocation(uid types.UID) // RemoveOrphanedPods removes the stored state for any pods not included in the set of remaining pods. RemoveOrphanedPods(remainingPods sets.Set[types.UID]) }
AllocationManager tracks pod resource allocations.
func NewInMemoryManager ¶
func NewInMemoryManager() Manager
NewInMemoryManager returns an allocation manager that doesn't persist state. For testing purposes only!
func NewManager ¶
Click to show internal directories.
Click to hide internal directories.