-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add AnnotatedEventf to events.EventRecorder #124170
base: master
Are you sure you want to change the base?
Conversation
Unlike `EventRecorder` interface in `tools/record` package, `EventRecorder` interface in `tools/events` package has no `AnnotatedEventf` method. Due to the lack of this method, clients are unable to record annotations on `events/v1.Event` through the recorder interface. This commit adds `AnnotatedEventf` to `EventRecorder` interface` in `tools/events` package to allow clients to record `events/v1.Event` with annotations. Signed-off-by: Sunghoon Kang <me@hoon.dev>
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Wed Apr 3 02:18:49 UTC 2024. |
Welcome @devholic! |
Hi @devholic. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: devholic The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @jiahuif |
It might be a good idea to discuss how this would interact with event correlation and to consider possible performance impacts. Instrumentation technically owns /sig instrumentation |
Agree. I'm not sure expanding use and variance of events is a great idea… if we were going to add this, I'd want to put guards in place to make sure we didn't start using this in kubelet, etc, which makes me wonder if it's a good thing to add. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/assign @dgrisonnet
/triage accepted
There was a PR last year trying to add the same functionality: #115058. Copying the reservation I had here: I also have reservations on this change and more generally toward adding labels/annotations to the Events. These objects are meant to be self explanatory, if additional information is needed, then Events are most likely not the right vector for this data. I am still standing by that today and would want to see a real use case before adding this functionality to the new events API.
Funnily enough this functionality was added to the core/v1 client implementation specifically for Kubelet: #64213, but if we could go back in time, I don't think we should've added it. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Unlike
EventRecorder
interface intools/record
package,EventRecorder
interface intools/events
package has noAnnotatedEventf
method. Due to the lack of this method, clients are unable to record annotations onevents/v1.Event
through the recorder interface.This PR adds
AnnotatedEventf
toEventRecorder
interfacein
tools/eventspackage to allow clients to record
events/v1.Event` with annotations.Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: