workloads

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodQoSClass

func GetPodQoSClass(pod *corev1.Pod) corev1.PodQOSClass

func LimitForRatio added in v0.14.0

func LimitForRatio(
	name corev1.ResourceName,
	request resource.Quantity,
	ratio resource.Quantity,
) (resource.Quantity, error)

LimitForRatio calculates request * ratio without floating-point arithmetic. The result is rounded down so it never exceeds the configured maximum ratio.

func PodLevelResourceSupported added in v0.14.0

func PodLevelResourceSupported(name corev1.ResourceName) bool

PodLevelResourceSupported reports whether Kubernetes permits the resource name in Pod-level resource requirements.

func RatioSupportedResource added in v0.14.0

func RatioSupportedResource(name corev1.ResourceName) bool

RatioSupportedResource reports whether Capsule can safely calculate a limit-to-request ratio for the resource. CPU is rounded down to milliCPU; byte-based resources are rounded down to whole bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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