-
Notifications
You must be signed in to change notification settings - Fork 429
Description
Describe what you are trying to solve
Antrea uses the core/v1 Event API to create Events. However the events.k8s.io/v1 API has been available (GA) since K8s 1.19, which also happens to be the minimum K8s version that we officially support in Antrea (which is a very conservative approach).
The "new" Event API introduces new fields, such as EventTime, and removes others, such as FirstTimestamp and LastTimestamp. There are other important changes: https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/383-new-event-api-ga-graduation/README.md
Even though the new fields were added to the core/v1 Event type (https://github.com/kubernetes/api/blob/v0.34.1/core/v1/types.go#L7440), if an Event is created through the core/v1 API, these fields are always unset.
Describe the solution you have in mind
Switch to the events.k8s.io/v1 API when creating Events from Antrea (e.g., in the Agent's Egress controller). The new fields will then be available to Event consumers.
Describe how your solution impacts user flows
Users have access to additional fields / information in the Event API.
Test plan
All existing unit tests and e2e tests should keep passing.