resmoio / kubernetes-event-exporter

Export Kubernetes events to multiple destinations with routing and filtering
Apache License 2.0
759 stars 149 forks source link

Question: Document leader election usage #116

Open fcoeguiguren opened 1 year ago

fcoeguiguren commented 1 year ago

I noted that there is some leader election flag and logic in the source code, but it is not clear to me on how and why is there.

Could you please update the docs?

Thanks

LHozzan commented 4 months ago

Same problem here :(. Some documentation improvement will be very helpful :).

LHozzan commented 4 months ago

Workaround:

Please use Bitnami Chart which is comprehensive.

... but it is not clear to me on how and why is there.

We discovered, that when we not using leaderElection (leaderElection: {}) AND we have N replicas, we getting the Kubernetes events from all the replicas. I mean, it duplicating events.

If we using the leaderElection:

leaderElection:
  enabled: true
  leaderElectionID: {{ LeaderElectionID }}

AND N replicas, we getting only one event record. Looks like another instances are just waiting, when leader is lost and take his role (follower -> leader), I guess.

Official documentation will be better, like guessing :).