-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add HA support to endpoints controller #479
Conversation
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.
I love that your comments are 10x your LOC changes 🗡️
Okay so silly question: I don't think we need to include unit testing for the manager's leader election itself but should we make an acceptance test of sorts to validate it end to end?
I'm ok with "no".
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.
If only all tickets were this easy!
That is a great idea. I did run the acceptance test with multiple instances running to ensure that there isnt a "breaking" change and manually checked that leaders got swapped when a pod got deleted. I guess i am on the fence about writing an acceptance test for this specifically only stems from the fact that we did not build in the leader election logic, and if someone makes a mistakes the existing tests should fail 😄 |
We should bump our replicas to 2 at some point. Then I think our acceptance tests as-is would be a good test. |
If we added upgrade testing this would also be a good test since during the deploy they'll need to hand-off elections. |
That sounds like a good idea. |
786f3bf
to
e638afb
Compare
- The controller manager allows for multiple instances of the controller to run using leader election. By configuring leader election, one of the instances of the controller (the leader) will run the reconciler. All instances can serve the webhook though, but only on of the instances will inject the containers per request. This requires additional priveleges from an RBAC perspective that will be a part of a helm commit.
e638afb
to
1ec160d
Compare
* Support HA for the endpoints controller - The controller manager allows for multiple instances of the controller to run using leader election. By configuring leader election, one of the instances of the controller (the leader) will run the reconciler. All instances can serve the webhook though, but only on the instances will inject the containers per request. This requires additional priveleges from an RBAC perspective that will be a part of a helm commit.
Use helm v3 in acceptance tests
Changes proposed in this PR:
How I've tested this PR:
ashwinvenkatesh/consul-k8s@sha256:2dc7eb5523645ecc7198212af8fa5056286ac01d9a015a5afcc5b4e95d50d695
How I expect reviewers to test this PR: