Pass event created timestamp correctly to cache

`CreatedAt` timestamp of `ContainerEventResponse` should be passed as
nanoseconds to `time.Unix()`.
This commit is contained in:
Hironori Shiina 2024-04-12 16:48:37 +02:00
parent cae35dba5a
commit 76128586a2

View File

@ -264,7 +264,7 @@ func (e *EventedPLEG) processCRIEvents(containerEventsResponseCh chan *runtimeap
}
shouldSendPLEGEvent = true
} else {
if e.cache.Set(podID, status, err, time.Unix(event.GetCreatedAt(), 0)) {
if e.cache.Set(podID, status, err, time.Unix(0, event.GetCreatedAt())) {
shouldSendPLEGEvent = true
}
}