Skip to content

Commit fa9efa2

Browse files
authored
Merge pull request kubernetes#3330 from uswitch/fix_boundary_panic
VPA: fix nil pointer in getBoundaryRecommendation when no limits set
2 parents fc9f92d + b324bde commit fa9efa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vertical-pod-autoscaler/pkg/utils/vpa/limit_and_request_scaling.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func GetBoundaryRequest(originalRequest, originalLimit, boundaryLimit, defaultLi
9797
}
9898
// originalLimit not set, no boundary
9999
if originalLimit == nil || originalLimit.Value() == 0 {
100-
return nil
100+
return &resource.Quantity{}
101101
}
102102
// originalLimit set but originalRequest not set - K8s will treat the pod as if they were equal
103103
if originalRequest == nil || originalRequest.Value() == 0 {

0 commit comments

Comments
 (0)