Merge pull request #3089 from krzysied/vpa_oom_cp_07
VPA - Always processing OOM samples
This commit is contained in:
commit
392f2f4f62
|
|
@ -134,7 +134,9 @@ func (container *ContainerState) GetMaxMemoryPeak() ResourceAmount {
|
|||
|
||||
func (container *ContainerState) addMemorySample(sample *ContainerUsageSample, isOOM bool) bool {
|
||||
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.
|
||||
}
|
||||
container.lastMemorySampleStart = ts
|
||||
|
|
|
|||
Loading…
Reference in New Issue