recommendation

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainersResources

func GetContainersResources(pod *core.Pod, vpaResourcePolicy *vpa_types.PodResourcePolicy, podRecommendation vpa_types.RecommendedPodResources, limitRange *core.LimitRangeItem,
	addAll bool, annotations vpa_api_util.ContainerToAnnotationsMap) []vpa_api_util.ContainerResources

GetContainersResources returns the recommended resources for each container in the given pod in the same order they are specified in the pod.Spec. If addAll is set to true, containers w/o a recommendation are also added to the list, otherwise they're skipped (default behaviour).

Types

type Provider

type Provider interface {
	GetContainersResourcesForPod(pod *core.Pod, mpa *mpa_types.MultidimPodAutoscaler) ([]vpa_api_util.ContainerResources, vpa_api_util.ContainerToAnnotationsMap, error)
}

Provider gets current recommendation, annotations and vpaName for the given pod.

func NewProvider

func NewProvider(calculator limitrange.LimitRangeCalculator,
	recommendationProcessor mpa_api_util.RecommendationProcessor) Provider

NewProvider constructs the recommendation provider that can be used to determine recommendations for pods.

Jump to

Keyboard shortcuts

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