Documentation
¶
Index ¶
- func GetPodQoSClass(pod *corev1.Pod) corev1.PodQOSClass
- func LimitForRatio(name corev1.ResourceName, request resource.Quantity, ratio resource.Quantity) (resource.Quantity, error)
- func PodLevelResourceSupported(name corev1.ResourceName) bool
- func RatioSupportedResource(name corev1.ResourceName) bool
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.
Click to show internal directories.
Click to hide internal directories.