mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-11-18 19:41:05 +01:00
feat(NSC): add endpoints that are ready or serving
In order to be compliant with upstream network implementation expectations we choose to proxy an endpoint as long as it is either ready OR serving. This means that endpoints that are terminating will still be proxied which makes kube-router conformant with the upstream e2e tests.
This commit is contained in:
parent
efddb2ea2f
commit
16daa08c7b
@ -1081,12 +1081,12 @@ func (nsc *NetworkServicesController) buildEndpointSliceInfo() endpointSliceInfo
|
||||
// protocol: TCP
|
||||
//
|
||||
for _, ep := range es.Endpoints {
|
||||
// Previously, when we used endpoints, we only looked at subsets.addresses and not subsets.notReadyAddresses
|
||||
// so here we need to limit our endpoints to only the ones that are ready. In the future, we could consider
|
||||
// changing this to .Serving which continues to include pods that are in Terminating state. For now we keep
|
||||
// it the same.
|
||||
if ep.Conditions.Ready == nil || !*ep.Conditions.Ready {
|
||||
klog.V(2).Infof("Endpoint (with addresses %s) does not have a ready status, skipping...", ep.Addresses)
|
||||
// We should only look at serving or ready if we want to be compliant with the upstream expectantions of a
|
||||
// network provider
|
||||
if (ep.Conditions.Serving == nil || !*ep.Conditions.Serving) &&
|
||||
(ep.Conditions.Ready == nil || !*ep.Conditions.Ready) {
|
||||
klog.V(2).Infof("Endpoint (with addresses %s) does not have a ready or serving status, skipping...",
|
||||
ep.Addresses)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user