-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Enhance Event Spam Key to Preserve Important Events During Reconciliations #124747
base: master
Are you sure you want to change the base?
Conversation
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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-sigs/prow repository. |
|
Welcome @l-technicore! |
Hi @l-technicore. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: l-technicore 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 |
event.Type, | ||
event.Reason, |
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.
The spam filter is meant to reduce the spam caused by faulty objects (https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/record/events_cache.go#L128-L129) on any of the events they produce. If we were to distinguish between type and reason, the rate limiting would be less effective than it is today.
Maybe it could be worth looking into making the spam filter aware of the event type so that there are dedicated priority seats available for critical events when there is a burst of both normal and critical events.
/assign @wojtek-t |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Description:
The current Kubernetes event spam key doesn't distinguish between event types and reasons. This leads to important events being lost during reconcile loops for stuck Kubernetes objects once the --event-ttl is reached (default: 1 hour)
Problem:
Example:
Solution:
This pull request proposes modifying the default event spam key to include event.Type and event.Reason. This allows the spam filter to differentiate between events based on their type and reason, preventing the loss of crucial information in scenarios like reconcile loops.
Benefits:
Possible Approaches:
Impact:
This approach should have minimal impact on etcd storage since only unique events (based on type and reason) are recorded, and the recording frequency is limited to one event every 5 minutes.
This pull request aims to enhance event visibility in Kubernetes by addressing the limitations of the current spam filter during reconcile loops. By differentiating events based on type and reason, we can ensure that critical information is preserved and readily accessible for debugging purposes.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: