Merge pull request #112334 from dgrisonnet/fix-eventseries-count

Fix EventSeries starting count discrepancy
This commit is contained in:
Kubernetes Prow Robot
2023-03-14 07:28:16 -07:00
committed by GitHub
3 changed files with 62 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ func (e *eventBroadcasterImpl) recordToSink(event *eventsv1.Event, clock clock.C
return nil
}
isomorphicEvent.Series = &eventsv1.EventSeries{
Count: 1,
Count: 2,
LastObservedTime: metav1.MicroTime{Time: clock.Now()},
}
// Make a copy of the Event to make sure that recording it

View File

@@ -108,7 +108,7 @@ func TestEventSeriesf(t *testing.T) {
nonIsomorphicEvent := expectedEvent.DeepCopy()
nonIsomorphicEvent.Action = "stopped"
expectedEvent.Series = &eventsv1.EventSeries{Count: 1}
expectedEvent.Series = &eventsv1.EventSeries{Count: 2}
table := []struct {
regarding k8sruntime.Object
related k8sruntime.Object