limitrange

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TotalRequests added in v0.4.0

func TotalRequests(ps *corev1.PodSpec) corev1.ResourceList

TotalRequests computes the total resource requests of a pod.

total = Max( Max(each InitContainerUse) , Sum(SidecarContainers) + Sum(Containers) ) + pod overhead

where:

InitContainerUse(i) = Sum(SidecarContainers with index < i) + InitContainer(i)

Types

type Summary

func Summarize

func Summarize(ranges ...corev1.LimitRange) Summary

Summarize summarizes the provides ranges by: 1. keeping the lowest values for Max and MaxLimitReqestRatio limits 2. keeping the highest values for Min limits 3. keeping the first encountered values for Default and DefaultRequests

func (Summary) ValidatePodSpec added in v0.4.0

func (s Summary) ValidatePodSpec(ps *corev1.PodSpec, path *field.Path) []string

ValidatePodSpec verifies if the provided podSpec (ps) first into the boundaries of the summary (s).

Jump to

Keyboard shortcuts

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