Repository navigation
feat: support LB priority for non xRoute endpoints - #4033
Conversation
Signed-off-by: Alexander Volchok <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4033 +/- ##
==========================================
+ Coverage 67.87% 67.92% +0.05%
==========================================
Files 187 187
Lines 23023 23030 +7
==========================================
+ Hits 15626 15644 +18
+ Misses 6277 6271 -6
+ Partials 1120 1115 -5 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
|
/retest |
2 similar comments
|
/retest |
|
/retest |
Signed-off-by: Alexander Volchok <[email protected]>
guydc
left a comment
There was a problem hiding this comment.
Can we also add an XDS translation test?
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
|
/retest |
added |
|
/retest |
added |
|
overall LGTM. cc @arkodg In terms of naming, I think that failover is a common industry term used by Akamai, Cloudflare, GCP, AWS and Azure in this context. Nginx and HAProxy use "backup". I think that "backup" can be a bit vague in this context:
We need to follow up with an E2E and user docs that explain how priorities interact with Active/Passive healthchecks and discovery. |
|
/retest |
Co-authored-by: zirain <[email protected]> Signed-off-by: Alex Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
|
/retest |
| // Only Service kind is supported for now. | ||
| gwapiv1.BackendObjectReference `json:",inline"` | ||
| // Failover This indicates whether the backend is designated as a failover. | ||
| // Multiple failover backends can be configured for a single BackendService. |
There was a problem hiding this comment.
| // Multiple failover backends can be configured for a single BackendService. | |
| // Multiple failover backends can be configured. |
| gwapiv1.BackendObjectReference `json:",inline"` | ||
| // Failover This indicates whether the backend is designated as a failover. | ||
| // Multiple failover backends can be configured for a single BackendService. | ||
| // +optional |
There was a problem hiding this comment.
"Its strongly recommended to configure active or passive healthchecks to ensure failover can be detected when the active backends are unhealthy and can be readjusted once the primary backends are healthy again. The overprovisioning factor is set to 1.4 i.e. the failover backends will receive traffic only once the health of the active backends drops below 72%"
| pnn := utils.NamespacedName(policy) | ||
| if ds, err = t.processExtServiceDestination( | ||
| backendRef, | ||
| &egv1a1.BackendRef{BackendObjectReference: *backendRef, Failover: priority}, |
There was a problem hiding this comment.
can we modify this to Failover: ptr.Deref(grpc.BackendRefs[0].Failover , false)
There was a problem hiding this comment.
this line is typecasting from bool from int32 ? can we make it more explicit, no strong preference on using bool or int in IR
There was a problem hiding this comment.
we don't have to type cast (its bool type both in ir/ api), priority var should be renamed failover in this context
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
|
/retest |
|
/retest |
|
/retest |
Adds a `failover` field to Backend API so we can support Active/Passive Failove backends within xRoutes similar to envoyproxy#4033 Relates to envoyproxy#3055 Signed-off-by: Arko Dasgupta <[email protected]>
* [api] Add Failover field to Backend Adds a `failover` field to Backend API so we can support Active/Passive Failove backends within xRoutes similar to #4033 Relates to #3055 Signed-off-by: Arko Dasgupta <[email protected]> * fix doc string Signed-off-by: Arko Dasgupta <[email protected]> * notImplementedHide Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]>
What does this PR do?
It enables users to configure failover backends.
How is this achieved?
The proposal involves adding a Failover boolean property to backend refs, what allows to indicate whether the backend is designated as a failover.
This approach is illustrated in this PR for external extProc.
As per issue #3055