diff --git a/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go b/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go index d98d64c886cc..79632fcc8123 100644 --- a/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go +++ b/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go @@ -66,7 +66,7 @@ const ( var ( resourceConsumerImage = imageutils.GetE2EImage(imageutils.ResourceConsumer) - stressCommand = []string{"/stress", "--mem-total", "10000000000", "--logtostderr", "--mem-alloc-size", "8000"} + stressCommand = []string{"/stress", "--mem-total", "10000000000", "--logtostderr", "--mem-alloc-size", "50000"} ) var ( @@ -443,8 +443,8 @@ func runOomingReplicationController(c clientset.Interface, ns, name string, repl Timeout: timeoutRC, Replicas: replicas, Annotations: make(map[string]string), - MemRequest: 1024 * 1024 * 1024, - MemLimit: 1024 * 1024 * 1024, + MemRequest: 1024 * 1024 * 300, + MemLimit: 1024 * 1024 * 500, } dpConfig := testutils.DeploymentConfig{ diff --git a/vertical-pod-autoscaler/e2e/v1/full_vpa.go b/vertical-pod-autoscaler/e2e/v1/full_vpa.go index 811f84aca3a4..d96277663069 100644 --- a/vertical-pod-autoscaler/e2e/v1/full_vpa.go +++ b/vertical-pod-autoscaler/e2e/v1/full_vpa.go @@ -43,7 +43,7 @@ const ( // the initial values should be outside minimal bounds initialCPU = int64(10) // mCPU initialMemory = int64(10) // MB - oomTestTimeout = 8 * time.Minute + oomTestTimeout = 12 * time.Minute ) var _ = FullVpaE2eDescribe("Pods under VPA", func() { diff --git a/vertical-pod-autoscaler/pkg/recommender/routines/vpa.go b/vertical-pod-autoscaler/pkg/recommender/routines/vpa.go index 0ba5c597c057..d7cfd66fcb0b 100644 --- a/vertical-pod-autoscaler/pkg/recommender/routines/vpa.go +++ b/vertical-pod-autoscaler/pkg/recommender/routines/vpa.go @@ -31,7 +31,7 @@ func GetContainerNameToAggregateStateMap(vpa *model.Vpa) model.ContainerNameToAg containerResourcePolicy := api_utils.GetContainerResourcePolicy(containerName, vpa.ResourcePolicy) autoscalingDisabled := containerResourcePolicy != nil && containerResourcePolicy.Mode != nil && *containerResourcePolicy.Mode == vpa_types.ContainerScalingModeOff - if !autoscalingDisabled && aggregatedContainerState.TotalSamplesCount > 0 { + if !autoscalingDisabled { aggregatedContainerState.UpdateFromPolicy(containerResourcePolicy) filteredContainerNameToAggregateStateMap[containerName] = aggregatedContainerState }