gateway
gateway copied to clipboard
feat(EG K8S Provider): implement leader election for EG controller
What type of PR is this?
feat(controller): implement leader election for EG controller
What this PR does / why we need it:
- This PR introduces leader election for the Envoy Gateway (EG) controller to ensure that only one instance of the controller can perform write operations at any given time.
- Ensure consistent availability of xDS (Envoy's discovery service) across the system.
The implementation follows best practices for distributed systems, enhancing the reliability and stability of the EG controller in multi-instance deployments.
Which issue(s) this PR fixes:
This enhancement facilitates the scaling of xDS services and enables leader election support.
https://github.com/envoyproxy/gateway/issues/1953
!draft changes!
Codecov Report
Attention: Patch coverage is 66.66667% with 32 lines in your changes are missing coverage. Please review.
Project coverage is 66.46%. Comparing base (
ec0f31b) to head (29da944).
Additional details and impacted files
@@ Coverage Diff @@
## main #2694 +/- ##
=======================================
Coverage 66.45% 66.46%
=======================================
Files 160 161 +1
Lines 22553 22632 +79
=======================================
+ Hits 14988 15042 +54
- Misses 6696 6717 +21
- Partials 869 873 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Should this PR also include some work in the infrastructure controller?
Should this PR also include some work in the infrastructure controller? Hi @guydc , We can attempt to ensure that there is only a single controller that can create/update e.g., infra related resources at a time.
Yes, the side effect at this point is that infra updates will result in concurrent updates and extra revision conflict's / retrys.
Should this PR also include some work in the infrastructure controller? Hi @guydc , We can attempt to ensure that there is only a single controller that can create/update e.g., infra related resources at a time.
The side effect at this point is that infra updates will result in concurrent updates and extra revision conflict's / retrys.
Added changes to ensure that infra will be created only by the elected EG instance.
/retest
/retest
finally got to this, thanks for building this out ! adding some comments
finally got to this, thanks for building this out ! adding some comments
Thanks!
/retest
/retest
/retest
/retest