Repository navigation
event-exporter-rs (1/3): add core crate, CLI/sharding, 24B PodOwnerTable, enricher, and metrics - #1303
Open
zxqlxy wants to merge 1 commit into
Open
event-exporter-rs (1/3): add core crate, CLI/sharding, 24B PodOwnerTable, enricher, and metrics#1303zxqlxy wants to merge 1 commit into
zxqlxy wants to merge 1 commit into
Conversation
…nricher, and metrics Part 1 of 3 introducing `event-exporter-rs`, a `#![forbid(unsafe_code)]` pure-Rust Kubernetes Event exporter for GKE: - `src/cli.rs` & `src/shard.rs`: Drop-in parser for GKE single-dash Go flags (`-sink-opts`, `-universeDomain`, `-system-namespaces`, `-event-label-selector`) plus KEP-5866 `--shard-mode=server` and Jump Consistent Hash `--shard-mode=client` Pod/Event co-partitioning. - `src/pod_cache.rs`: Lock-sharded open-addressed 24-byte/slot `PodOwnerTable` (`16B PodKey` + `8B CompactOwner`) resolving `Deployment`, `StatefulSet`, `DaemonSet`, `CronJob`, `Job`, and `JobSet` (`restart-attempt` + `jobset-uid`) owners while holding 1,000,000 active Pods in ~50.4 MiB RSS delta (~58.8 MiB total process RSS vs. >1.2 GiB in Go `client-go`). - `src/enricher.rs` & `src/metrics.rs`: Cloud Logging `k8s_pod`/`k8s_node`/`k8s_cluster` routing, cross-namespace RBAC spoofing guard, `fieldBlacklist` filtering, Gregorian RFC3339 validation, and 100% LOrIS Prometheus metric compatibility. - Formal state-machine refinement, sharding bijection, and 1,000,000-pod memory benchmark suites, wired into GitHub Actions (`ci-rust-event-exporter`).
zxqlxy
force-pushed
the
event-exporter-rs-pr1
branch
from
November 11, 2026 02:35
4f6f290 to
39df98a
Compare
zxqlxy
marked this pull request as ready for review
November 11, 2026 06:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary (Part 1 of 3)
Adds the core crate, CLI/sharding model, 24-byte/slot
PodOwnerTable, Cloud Logging event enricher, and LOrIS Prometheus metrics forevent-exporter-rs, a standalone#![forbid(unsafe_code)]Rust implementation of GKE's Kubernetes Event exporter alongside the existing Goevent-exporter/.On 100k to 1M Pod clusters, the Go exporter repeatedly OOMKills inside its
100Mimemory budget (0.8 GiBto1.6 GiBpeak RSS during initial WatchList bursts underGOGC=100, plus unpoppedDeltaFIFO.Replace()entries onListfallback).PodOwnerTablestores interned Pod controller owners in flat 24-byte open-addressed slots (16B PodKey+8B CompactOwner), holding 1,000,000 active Pods in~50.4 MiBRSS delta (~58.8 MiBtotal process RSS).Included in Part 1
src/cli.rs&src/shard.rs: Drop-in parser for GKE single-dash Go flags (-sink-opts,-universeDomain,-system-namespaces,-event-label-selector) plus KEP-5866--shard-mode=serverand Jump Consistent Hash--shard-mode=clientPod/Event co-partitioning.src/pod_cache.rs: Lock-sharded 24-byte/slotPodOwnerTableresolvingDeployment,StatefulSet,DaemonSet,CronJob,Job, andJobSet(restart-attempt+jobset-uid) owners.src/enricher.rs&src/metrics.rs:k8s_pod/k8s_node/k8s_clusterrouting, cross-namespace RBAC spoofing guard (event.metadata.namespace == involvedObject.namespace),fieldBlacklistfiltering, Gregorian RFC3339 validation, and:8080/metrics+/healthzLOrIS compatibility.tests/&.github/: Exhaustive state-machine refinement test, sharding bijection test, 1,000,000-pod memory benchmark, GitHub Actionsci-rust-event-exporterworkflow, and Dependabotcargoupdates.Stack
PodOwnerTable, enricher, and metricsNodeTokenBroker/ Metadata auth, bounded batch pipeline, and dual Cloud Logging v2 + OTLP sinks410 Gonerecovery, binary entrypoint,gcr.io/distroless/staticDockerfile, and multi-shard E2E suite