Inform user of dropped events #8572
This pull request introduces a new "K8s Event Reporter" component for Knative Eventing, including its deployment, RBAC configuration, and usage documentation. The main goal is to provide a service that aggregates dead-letter events and records them as Kubernetes Warning events for improved monitoring and alerting. The changes span across the implementation of the reporter, its deployment manifests, RBAC permissions, and sample usage instructions.
New Component Implementation:
- Added the main implementation for the K8s Event Reporter in
cmd/k8seventreporter/main.go, featuring event aggregation, health checks, observability integration, and a handler that records dead-letter events as Kubernetes events.
Deployment and Service Configuration:
- Introduced a deployment manifest (
config/500-k8s-event-reporter.yaml) for the K8s Event Reporter, including container configuration, probes, resource limits, and service definition for exposing HTTP and metrics endpoints.
RBAC and Service Account Setup:
- Added RBAC configuration (
config/200-k8s-event-reporter-clusterrole.yaml) granting necessary permissions to read configmaps, create/update events, and access brokers, triggers, channels, and subscriptions. - Created a service account and cluster role binding manifest (
config/200-k8s-event-reporter-serviceaccount.yaml) to associate the deployment with the required permissions.
Documentation and Usage Example:
- Provided a sample configuration (
config/samples/k8s-event-reporter-usage.yaml) demonstrating how to set up a Broker or Trigger with a dead-letter sink pointing to the K8s Event Reporter for event delivery failure handling.
Fixes #
Proposed Changes
Pre-review Checklist
- [ ] At least 80% unit test coverage
- [ ] E2E tests for any new behavior
- [ ] Docs PR for any user-facing impact
- [ ] Spec PR for any new API feature
- [ ] Conformance test for any change to the spec
Release Note
Docs
This pull request introduces a new "K8s Event Reporter" component to the Knative Eventing system, providing a deployment, RBAC configuration, and usage guidance for reporting Kubernetes events based on failed event deliveries. The main changes add all necessary manifests and the main application entrypoint for this new feature.
New K8s Event Reporter Component
- Adds a new Go entrypoint for the K8s Event Reporter, handling initialization, config watching, and event processing (
cmd/k8seventreporter/main.go).
RBAC and Service Account Configuration
- Introduces a
ClusterRoleandClusterRoleBindinggranting the reporter permissions to read configmaps, brokers, triggers, channels, and to create/update Kubernetes events (config/200-k8s-event-reporter-clusterrole.yaml,config/200-k8s-event-reporter-serviceaccount.yaml) [1] [2].
Deployment and Service Manifests
- Provides a deployment and service definition for running the K8s Event Reporter in the
knative-eventingnamespace, including resource limits, probes, and security context (config/500-k8s-event-reporter.yaml).
Usage Documentation
- Adds a sample manifest demonstrating how to configure a Broker or Trigger to use the K8s Event Reporter as a dead-letter sink, enabling failed event deliveries to be surfaced as Kubernetes warning events (
config/samples/k8s-event-reporter-usage.yaml).
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: namanONcode Once this PR has been reviewed and has the lgtm label, please assign pierdipi for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Welcome @namanONcode! It looks like this is your first PR to knative/eventing 🎉
Hi @namanONcode. Thanks for your PR.
I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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.