-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add gprcroute support to inbound policy API #12785
Conversation
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
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.
Looks good and pretty straight to the point. I haven't tested this, fwiw. I like how nicely this slots in with the existing logic we have in the index and it seems like most of the logic is non contentious (wiring up another resource).
I did have a question about gRPC probes but I figured that'd be a non-goal for this change anyway. Besides, gRPC probes are a k8s 1.27 feature 🤷🏻 it'd probably be trivial to add it in later when the time comes.
.filter(|(_, route)| route.selects_server(server_name)) | ||
.filter(|(_, route)| route.accepted_by_server(server_name)) |
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.
would it make sense to collapse these two in the same line?
.filter(|(_, route)| route.selects_server(server_name) && route.accepted_by_server(server_name))
fn reset_grpc_route( | ||
&mut self, | ||
routes: Vec<k8s_gateway_api::GrpcRoute>, | ||
deleted: HashMap<String, HashSet<String>>, | ||
) { | ||
let _span = info_span!("gprcroute reset").entered(); |
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.
tioli
fn reset_grpc_route( | |
&mut self, | |
routes: Vec<k8s_gateway_api::GrpcRoute>, | |
deleted: HashMap<String, HashSet<String>>, | |
) { | |
let _span = info_span!("gprcroute reset").entered(); | |
#[tracing::instrument(skip_all)] | |
fn reset_grpc_route( | |
&mut self, | |
routes: Vec<k8s_gateway_api::GrpcRoute>, | |
deleted: HashMap<String, HashSet<String>>, | |
) { |
Signed-off-by: Alex Leong <alex@buoyant.io>
We add support for grpcroute in the inbound policy API. When a Server resource has the proxy protocol set to grpc, we will now serve grpc as the protocol in the inbound policy API along with any GrpcRoutes which have been defined and attached to the Server. If grpc is specified as the proxy protocol but no GrpcRoutes are attached, we return a default catch-all grpc route.