Skip to content

ginsys/k8s-event-aggregation

Repository files navigation

Kubernetes Event Aggregator (Scaffold)

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.

Quick Start (Local)

  • Build: make build (binary at bin/aggregator)
  • Dev run: make dev and paste JSON lines (see samples/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"}

Policy

Provide a JSON policy describing grouping and windows. See config/policy.example.json.

Deploy (skeleton)

Kustomize base under deploy/kustomize/base includes RBAC, ConfigMap policy, and CRD stub. Apply with: kubectl apply -k deploy/kustomize.

Roadmap

  • Implement Kubernetes watcher using client-go informers.
  • Controller to reconcile EventAggregationPolicy CRDs.
  • Additional sinks (Prometheus/OTel/Webhook).

Refer to AGENTS.md for contributor guidelines.

References

License

This project is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published