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.
Click to show internal directories.
Click to hide internal directories.