Skip to content

Commit 0024e87

Browse files
committed
Update aggregatedContainerState from containerResourcePolicy
This is needed for map containerName: aggregatedState to contain complete information (not only samples, but also resource policy), which can be later processed downstream. In particular, it is needed for VPA controlled resources.
1 parent f114438 commit 0024e87

File tree

1 file changed

+1
-0
lines changed
  • vertical-pod-autoscaler/pkg/recommender/routines

1 file changed

+1
-0
lines changed

vertical-pod-autoscaler/pkg/recommender/routines/vpa.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func GetContainerNameToAggregateStateMap(vpa *model.Vpa) model.ContainerNameToAg
3232
autoscalingDisabled := containerResourcePolicy != nil && containerResourcePolicy.Mode != nil &&
3333
*containerResourcePolicy.Mode == vpa_types.ContainerScalingModeOff
3434
if !autoscalingDisabled && aggregatedContainerState.TotalSamplesCount > 0 {
35+
aggregatedContainerState.UpdateFromPolicy(containerResourcePolicy)
3536
filteredContainerNameToAggregateStateMap[containerName] = aggregatedContainerState
3637
}
3738
}

0 commit comments

Comments
 (0)