event-exporter-v2: shared-nothing HA re-architecture#3
Open
event-exporter-v2: shared-nothing HA re-architecture#3
Conversation
Bumps [github.com/google/gofuzz](https://github.com/google/gofuzz) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/google/gofuzz/releases) - [Commits](google/gofuzz@v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: github.com/google/gofuzz dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps google.golang.org/protobuf from 1.28.1 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/golang/glog](https://github.com/golang/glog) from 1.2.4 to 1.2.5. - [Release notes](https://github.com/golang/glog/releases) - [Commits](golang/glog@v1.2.4...v1.2.5) --- updated-dependencies: - dependency-name: github.com/golang/glog dependency-version: 1.2.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps golang from 1.24 to 1.25. --- updated-dependencies: - dependency-name: golang dependency-version: '1.25' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.0.0-20220223155221-ee480838109b to 0.32.0. - [Commits](https://github.com/golang/oauth2/commits/v0.32.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-version: 0.32.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.224.0 to 0.253.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.224.0...v0.253.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-version: 0.253.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.45.0. - [Commits](golang/crypto@v0.36.0...v0.45.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.45.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps golang from 1.23.2 to 1.25.5. --- updated-dependencies: - dependency-name: golang dependency-version: 1.25.5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps golang from 1.24 to 1.25. --- updated-dependencies: - dependency-name: golang dependency-version: '1.25' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…cher-streaming Allow watch streaming option for lister watcher to prevent high memory spike.
…cher-streaming Bump event-exporter version to v0.5.9
…cher-streaming Enable streaming listWatcher only if the required k8s feature gate is enabled
Bump up golang.org/x/crypto to 0.45.0 for event-exporter
…rMetriclabel update extractAllLabels to filter out labels that aren't metric labels
…attempt Add restart attempt and jobset uid labels in pod owner transform
Switch to buildx from legacy docker builder
…e-fix Switch to buildx from legacy docker builder
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.2 to 1.79.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.79.2...v1.79.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.79.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/custom-metrics-stackdriver-adapter/google.golang.org/grpc-1.79.3 Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /custom-metrics-stackdriver-adapter
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.3 to 1.79.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.56.3...v1.79.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.79.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.2 to 1.79.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.79.2...v1.79.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.79.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/custom-metrics-stackdriver-adapter/examples/direct-to-sd/google.golang.org/grpc-1.79.3 Bump google.golang.org/grpc from 1.56.3 to 1.79.3 in /custom-metrics-stackdriver-adapter/examples/direct-to-sd
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.2 to 1.79.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.79.2...v1.79.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.79.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.2 to 1.79.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.79.2...v1.79.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.79.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/event-exporter/google.golang.org/grpc-1.79.3 Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /event-exporter
…dependabot/go_modules/prometheus-to-sd/google.golang.org/grpc-1.79.3 Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /prometheus-to-sd
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.270.0 to 0.272.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.270.0...v0.272.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-version: 0.272.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/prometheus-to-sd/google.golang.org/api-0.272.0 Bump google.golang.org/api from 0.270.0 to 0.272.0 in /prometheus-to-sd
…e-fix Bump version to 0.16.4
…dependabot/go_modules/kubelet-to-gcm/google.golang.org/grpc-1.79.3 Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /kubelet-to-gcm
Bumps [k8s.io/component-base](https://github.com/kubernetes/component-base) from 0.35.2 to 0.35.3. - [Commits](kubernetes/component-base@v0.35.2...v0.35.3) --- updated-dependencies: - dependency-name: k8s.io/component-base dependency-version: 0.35.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/custom-metrics-stackdriver-adapter/k8s.io/component-base-0.35.3 Bump k8s.io/component-base from 0.35.2 to 0.35.3 in /custom-metrics-stackdriver-adapter
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.35.2 to 0.35.3. - [Commits](kubernetes/apimachinery@v0.35.2...v0.35.3) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-version: 0.35.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.35.2 to 0.35.3. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.35.2...v0.35.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-version: 0.35.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/prometheus-to-sd/k8s.io/apimachinery-0.35.3 Bump k8s.io/apimachinery from 0.35.2 to 0.35.3 in /prometheus-to-sd
…dependabot/go_modules/event-exporter/k8s.io/client-go-0.35.3 Bump k8s.io/client-go from 0.35.2 to 0.35.3 in /event-exporter
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.35.2 to 0.35.3. - [Commits](kubernetes/api@v0.35.2...v0.35.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.35.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.35.2 to 0.35.3. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.35.2...v0.35.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-version: 0.35.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/prometheus-to-sd/k8s.io/api-0.35.3 Bump k8s.io/api from 0.35.2 to 0.35.3 in /prometheus-to-sd
…dependabot/go_modules/prometheus-to-sd/k8s.io/client-go-0.35.3 Bump k8s.io/client-go from 0.35.2 to 0.35.3 in /prometheus-to-sd
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.130.1 to 2.140.0. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.130.1...2.140.0) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-version: 2.140.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…dependabot/go_modules/event-exporter/k8s.io/klog/v2-2.140.0 Bump k8s.io/klog/v2 from 2.130.1 to 2.140.0 in /event-exporter
…hing for HA Add event-exporter-v2 as a new standalone module alongside the existing event-exporter. This is a re-architecture of the event exporter for higher performance, scalability, and high availability while maintaining the same core functionality (exporting all cluster events to GCP Cloud Logging) and low cluster-wide footprint. Key changes from event-exporter: - Shared-nothing consistent hashing for multi-pod horizontal scaling - Peer discovery via headless Service Endpoints informer - Hash-based event partitioning (xxhash modulo) across pods - Deterministic InsertId for Cloud Logging deduplication during rebalancing - Exponential backoff with jitter replacing fixed 10s retry - Tuned defaults: buffer 500 (was 100), concurrency 25 (was 10), flush 2s (was 5s) - New Prometheus metrics: queue_depth, peer_count, events_owned/dropped_by_hash - Readiness probe (/readyz) gated on peer discovery sync - HA deployment manifest with headless Service, HPA, and PDB - Fully backward compatible: single-pod mode when --headless-service-name is empty Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Re-architecture of the event-exporter as a new standalone module (
event-exporter-v2/) for horizontal scalability and high availability. The originalevent-exporter/is untouched.xxhash(namespace/name) % NInsertIdfor Cloud Logging deduplication during scaling transitions--headless-service-nameis emptyDesign
Architecture
How consistent hashing works
POD_IP(Downward API) and finds its index in the sorted listowner = xxhash(namespace/name) % len(peers)— ifowner == myIndex, process itInsertId = namespace/name/resourceVersionhandles brief overlaps during scalingWhy shared-nothing over leader-worker
Scaling behavior
InsertIdNew files (vs original event-exporter)
peerdiscovery/discovery.goIsOwner()hash checkpeerdiscovery/discovery_test.gopeerdiscovery/metrics.goevent_exporter_peer_count,event_exporter_peer_updates_totalexample/event-exporter-ha.yamlModified files (vs original event-exporter)
main.go--headless-service-nameflag, PeerDiscovery init,/readyzendpointevent_exporter.gosinks/stackdriver/sink.goOnAdd/OnUpdate(before serialization), queue depth reportingsinks/stackdriver/sink_factory.goCreateNewWithOwnerCheckermethodsinks/stackdriver/sink_config.gosinks/stackdriver/writer.gosinks/stackdriver/log_entry_factory.goInsertIdsinks/stackdriver/metrics.goevents_dropped_by_hash_total,events_owned_total,queue_depthNew Prometheus metrics
event_exporter_peer_countevent_exporter_peer_updates_totalevent_exporter_events_dropped_by_hash_totalevent_exporter_events_owned_totalevent_exporter_queue_depthStatus
This is an initial working implementation. Known TODOs:
InsertIddeduplication behavior under rebalancingTest plan
go test ./...(peerdiscovery, sinks, watchers, podlabels)go vet ./...cleango build ./...succeedsevent-exporter/untouched and builds/tests independently🤖 Generated with Claude Code