util

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAvailableCPUHints             = pkgerrors.New("no available cpu hints")
	ErrNoAvailableMemoryBandwidthHints = pkgerrors.New("no available memory bandwidth hints")
)

Functions

func AdvisorDegradation added in v0.5.4

func AdvisorDegradation(advisorHealth, enableReclaim bool) bool

func CPUIsSufficient added in v0.5.12

func CPUIsSufficient(request, available float64) bool

func GetContainerRequestedCores added in v0.5.28

func GetContainerRequestedCores(metaServer *metaserver.MetaServer, allocationInfo *state.AllocationInfo) float64

GetContainerRequestedCores parses and returns request cores for the given container

func GetCoresReservedForSystem added in v0.4.0

func GetCoresReservedForSystem(conf *config.Configuration, metaServer *metaserver.MetaServer, machineInfo *machine.KatalystMachineInfo, allCPUs machine.CPUSet) (machine.CPUSet, error)

func PackAllocationResponse added in v0.4.0

func PackAllocationResponse(allocationInfo *state.AllocationInfo, resourceName, ociPropertyName string,
	isNodeResource, isScalarResource bool, req *pluginapi.ResourceRequest,
) (*pluginapi.ResourceAllocationResponse, error)

PackAllocationResponse fills pluginapi.ResourceAllocationResponse with information from AllocationInfo and pluginapi.ResourceRequest

func PopulateHintsByAvailableNUMANodes added in v0.5.28

func PopulateHintsByAvailableNUMANodes(
	numaNodes []int,
	hints *pluginapi.ListOfTopologyHints,
	preferred bool,
)

func RegenerateHints added in v0.4.0

func RegenerateHints(allocationInfo *state.AllocationInfo, regenerate bool) map[string]*pluginapi.ListOfTopologyHints

RegenerateHints regenerates hints for container that'd already been allocated cpu, and regenerateHints will assemble hints based on already-existed AllocationInfo, without any calculation logics at all

Types

This section is empty.

Jump to

Keyboard shortcuts

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