Skip to content

[P0] event-exporter: use watchlist + bookmarks to avoid expensive initial list #1029

@erain

Description

@erain

Problem

Initial list of Events is expensive for large clusters. Even though the current watcher clears list.Items to avoid local buffering, the apiserver still has to produce and transmit the full list before the watch starts. This delays readiness and increases API load when event volume is high.

Proposed optimization

Use watchlist semantics (SendInitialEvents + watch bookmarks) so the initial state is streamed over watch and ends with a bookmark. This avoids large list bursts and provides a clean sync point for the watcher.

Notes / references

Acceptance criteria

  • Event watcher uses watchlist for initial sync and handles bookmark completion.
  • Startup time and apiserver request volume are reduced vs. full list on large clusters.
  • Fallback to list/watch remains in place for clusters that do not support watchlist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions