GetTimestampMs method should read timestamp from eventTime instead. Otherwise the timestamp is regarded as zero value, such timestamp cause issues(e.g. Loki sink rejects the event).
I will submit a PR for this and check the behavior of different versions of kube-scheduler.
On kubernetes 1.19.x version, kube-scheduler emits
FailedScheduling
event withFirstTimestamp
field set tonull
.GetTimestampMs
method should read timestamp fromeventTime
instead. Otherwise the timestamp is regarded as zero value, such timestamp cause issues(e.g. Loki sink rejects the event).I will submit a PR for this and check the behavior of different versions of kube-scheduler.