Skip to content
Snippets Groups Projects
Unverified Commit 392f2f4f authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub
Browse files

Merge pull request #3089 from krzysied/vpa_oom_cp_07

VPA - Always processing OOM samples
parents 0c8abf53 2159cb65
Branches
Tags
No related merge requests found
...@@ -134,7 +134,9 @@ func (container *ContainerState) GetMaxMemoryPeak() ResourceAmount { ...@@ -134,7 +134,9 @@ func (container *ContainerState) GetMaxMemoryPeak() ResourceAmount {
func (container *ContainerState) addMemorySample(sample *ContainerUsageSample, isOOM bool) bool { func (container *ContainerState) addMemorySample(sample *ContainerUsageSample, isOOM bool) bool {
ts := sample.MeasureStart ts := sample.MeasureStart
if !sample.isValid(ResourceMemory) || ts.Before(container.lastMemorySampleStart) { // We always process OOM samples.
if !sample.isValid(ResourceMemory) ||
(!isOOM && ts.Before(container.lastMemorySampleStart)) {
return false // Discard invalid or outdated samples. return false // Discard invalid or outdated samples.
} }
container.lastMemorySampleStart = ts container.lastMemorySampleStart = ts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment