GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver
[P2] event-exporter: add field selector support for events
- Dominant language
- Go
- Stars
- 409
- Forks
- 236
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 9
Description
## Problem
Filtering is limited to label selectors. There is no way to reduce event volume by field selectors (e.g., `type=Warning`, `involvedObject.kind=Pod`), which is a common operational need in large clusters.
## Proposed optimization
Add configuration for `ListOptions.FieldSelector` in the event watcher to allow server-side filtering. This reduces API load and export volume for users who only need a subset of events.
## Notes / references
- Field selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/
- ListOptions: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#ListOptions
## Acceptance criteria
- New flag or config option to set field selector for events.
- Field selector applied to both list and watch requests.
- Documentation updated with examples (e.g., `type=Warning`).
Contributor guide
Assessment
This issue has not been assessed yet.