-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
agent/xds: Update mesh gateway to use service router timeout #7444
agent/xds: Update mesh gateway to use service router timeout #7444
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.
This looks to all function correctly but I found the flow in the cluster generation a little hard to follow. Could you take a look and see if there is a reasonable way to refactor. If all other alternatives are "ugly" then maybe just adding a few comments (like at that continue and outside of the hasResolver block) indicating how the control-flow should be working.
agent/xds/clusters.go
Outdated
return nil, err | ||
} | ||
clusters = append(clusters, cluster) | ||
continue |
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.
It was immediately clear to me why there was a continue
here. I eventually figured it out that it was to avoid the code below when we already know we don't have a resolver (to prevent some segfaults)
Could there be a way to refactor this code a little to make the code flow a little clearer? Maybe a way that we only generate the unnamed subsets cluster in 1 location?
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.
Updated! Happy to improve readability
5b6dc61
to
a4a9849
Compare
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.
LGTM
a4a9849
to
609ce45
Compare
* website/connect/proxy/envoy: specify timeout precedence for services behind mesh gateway
The PR updates the connection timeout used for services behind a mesh gateway to prioritize the configured
service-resolver
timeout, and falls back to use the timeout of the mesh gateway.Fixes #6370