This repository scaffolds a Kubernetes event aggregation service inspired by the upstream proposal. It groups events.k8s.io/v1 events by policy and emits periodic aggregates.
Status: scaffold with working in-cluster Kubernetes event watch. For local testing without a cluster, use --dev with stdin JSON lines.
- Build:
make build(binary atbin/aggregator) - Dev run:
make devand paste JSON lines (seesamples/events.jsonl) - Test:
make test
Container image:
- Build:
docker build -t ghcr.io/ginsys/event-aggregation:dev . - Run in cluster with manifests under
deploy/kustomize(image ref defaults to the above tag).
Example event JSON line:
{"namespace":"default","reason":"BackOff","involvedKind":"Pod","involvedName":"web-7c9","message":"Back-off restarting failed container","timestamp":"2025-01-01T00:00:00Z"}
Provide a JSON policy describing grouping and windows. See config/policy.example.json.
Kustomize base under deploy/kustomize/base includes RBAC, ConfigMap policy, and CRD stub.
Apply with: kubectl apply -k deploy/kustomize.
- Implement Kubernetes watcher using client-go informers.
- Controller to reconcile
EventAggregationPolicyCRDs. - Additional sinks (Prometheus/OTel/Webhook).
Refer to AGENTS.md for contributor guidelines.
- Enhancing Kubernetes Event Management with Custom Aggregation: https://kubernetes.io/blog/2025/06/10/enhancing-kubernetes-event-management-custom-aggregation/
This project is licensed under the MIT License. See LICENSE for details.