Skip to content

Commit

Permalink
Remove erroneous nil check on resourcePolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicbozzuto committed Apr 23, 2024
1 parent 472c584 commit 2ff06d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func (p *allowedResourceFilter) Apply(podRecommendation *vpa_types.RecommendedPo
conditions []vpa_types.VerticalPodAutoscalerCondition,
pod *corev1.Pod) (*vpa_types.RecommendedPodResources, ContainerToAnnotationsMap, error) {

if podRecommendation == nil || policy == nil {
// If there is no recommendation or no policies have been defined then no recommendation can be computed.
return podRecommendation, nil, nil
if podRecommendation == nil {
// If there is no recommendation then no filtered recommendation can be computed.
return nil, nil, nil
}

accumulatedContainerToAnnotationsMap := ContainerToAnnotationsMap{}
Expand Down

0 comments on commit 2ff06d5

Please sign in to comment.