limitrange

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 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 = sum(max(sum(.containers[].requests), initContainers[].requests), overhead)

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