Skip to content

Commit 9440f37

Browse files
authored
Merge pull request kubernetes#2919 from bskiba/admission-refactor
Revert making getContainerResources private
2 parents cb7d68f + b5aebdc commit 9440f37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vertical-pod-autoscaler/pkg/admission-controller/resource/pod/recommendation_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewRecommendationProvider(calculator limitrange.LimitRangeCalculator,
4646
}
4747

4848
// GetContainersResources returns the recommended resources for each container in the given pod in the same order they are specified in the pod.Spec.
49-
func getContainersResources(pod *core.Pod, podRecommendation vpa_types.RecommendedPodResources, limitRange *core.LimitRangeItem,
49+
func GetContainersResources(pod *core.Pod, podRecommendation vpa_types.RecommendedPodResources, limitRange *core.LimitRangeItem,
5050
annotations vpa_api_util.ContainerToAnnotationsMap) []vpa_api_util.ContainerResources {
5151
resources := make([]vpa_api_util.ContainerResources, len(pod.Spec.Containers))
5252
for i, container := range pod.Spec.Containers {
@@ -95,6 +95,6 @@ func (p *recommendationProvider) GetContainersResourcesForPod(pod *core.Pod, vpa
9595
if err != nil {
9696
return nil, nil, fmt.Errorf("error getting containerLimitRange: %s", err)
9797
}
98-
containerResources := getContainersResources(pod, *recommendedPodResources, containerLimitRange, annotations)
98+
containerResources := GetContainersResources(pod, *recommendedPodResources, containerLimitRange, annotations)
9999
return containerResources, annotations, nil
100100
}

0 commit comments

Comments
 (0)