Skip to content

Commit

Permalink
Merge pull request #5326 from voelzmo/enh/fix-oomkill-crashloopbackoff
Browse files Browse the repository at this point in the history
Stop filtering aggregatedContainerStates without samples
  • Loading branch information
k8s-ci-robot authored Jan 30, 2023
2 parents 65c098b + 25106e9 commit 09f851d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/e2e/v1/full_vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/recommender/routines/vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 09f851d

Please sign in to comment.