-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[receiver/k8seventsreceiver] support leader election using k8sleaderelector extension #42330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lector extension Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
ChrsMark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank's for working on this!
The change looks mostly good to me with a question regarding how we should handle leadership changes across all similar components for consistency+accuracy.
…-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…lector-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
ChrsMark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's ensure we are consistent on how we consume the extension in different components: #42330 (comment)
@dmitryax please take a look too
|
@ChrsMark issues opened:
If someone can assign it to me, I really appreciate it 🙌 |
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…lector-contrib into feat/42266 Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…rmer handler (#43018) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description As discussed in the following [thread](#42330 (comment)), I decided to open a dedicated PR for this. The change just makes the code safer, as before we were assuming the object was always an Event, which could panic if it wasn’t. Now we check first, and skip anything that isn’t an Event. Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…e is lost (#43054) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Similar to what we did in #42330, this PR ensures similarity and puts the receiver in stand-by instead of shutdown when `k8sleaderelector` is used. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #42706 <!--Describe what testing was performed and which tests were added.--> #### Testing Tested locally, and tests were not changed to ensure the current receiver is not affected at all. <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Description
Adding support for leader election using
k8sleaderelectorextension.Link to tracking issue
Fixes #42266
Testing
Added the test
TestReceiverWithLeaderElection.I'm just missing testing it in a real scenario, but I will do it next week. However, I marked it as ready for review for discussing the logic and structure 🙏
Documentation
Updated README.md with the example of how it can be used.