Fixing bug with windows criStatsProvider sometimes not reporting AvailableBytes correctly

Signed-off-by: Mark Rossetti <marosset@microsoft.com>
This commit is contained in:
Mark Rossetti 2024-01-18 10:13:49 -08:00
parent 3bbf0cc47f
commit 5691a7899e
No known key found for this signature in database
GPG Key ID: 3188D8FC849D8762

View File

@ -142,7 +142,7 @@ func (p *criStatsProvider) makeWinContainerStats(
result.Memory.AvailableBytes = &stats.Memory.AvailableBytes.Value
}
if stats.Memory.PageFaults != nil {
result.Memory.AvailableBytes = &stats.Memory.PageFaults.Value
result.Memory.PageFaults = &stats.Memory.PageFaults.Value
}
} else {
result.Memory.Time = metav1.NewTime(time.Unix(0, time.Now().UnixNano()))