-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: set leader election when single controller deployments are configured #3529
feat: set leader election when single controller deployments are configured #3529
Conversation
730e978
to
1065014
Compare
Codecov ReportBase: 72.3% // Head: 72.4% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #3529 +/- ##
=====================================
Coverage 72.3% 72.4%
=====================================
Files 121 120 -1
Lines 14357 14321 -36
=====================================
- Hits 10394 10380 -14
+ Misses 3295 3279 -16
+ Partials 668 662 -6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
1065014
to
3b4a0df
Compare
I've tweaked the readyz handler, please see the description. |
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.
The logic seems correct to me. 👍
What this PR does / why we need it:
This PR ensures we enable leader election when Admin API service discovery is enabled.
Which issue this PR fixes:
Fixes #3528
Special notes for your reviewer:
When implemented this way (the same we used to do it for other configurations, dbless or not) KIC's deployment has only 1 ready Pod - the leader - and all the other ones are not ready, because the readiness probe set tokubernetes-ingress-controller/internal/manager/run.go
Lines 171 to 178 in 22f6bad
is not responding since the dataplane synchronizer is not ready yet.Is that desired? Or do we want non-leader pods to be ready as well?The readyz handler was changed to allow all Pods from KIC's Deployment to be marked as ready. The leader will be marked as ready when the dataplane synchronizer is ready whereas the other Pods will be ready regardless (given that it responds to readiness probe requests).
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR