Skip to content

Commit 7612858

Browse files
committed
Pass event created timestamp correctly to cache
`CreatedAt` timestamp of `ContainerEventResponse` should be passed as nanoseconds to `time.Unix()`.
1 parent cae35db commit 7612858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubelet/pleg/evented.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (e *EventedPLEG) processCRIEvents(containerEventsResponseCh chan *runtimeap
264264
}
265265
shouldSendPLEGEvent = true
266266
} else {
267-
if e.cache.Set(podID, status, err, time.Unix(event.GetCreatedAt(), 0)) {
267+
if e.cache.Set(podID, status, err, time.Unix(0, event.GetCreatedAt())) {
268268
shouldSendPLEGEvent = true
269269
}
270270
}

0 commit comments

Comments
 (0)