Skip to content

feat(metal-control-plane): add GatewayAPI support#156

Open
l0wl3vel wants to merge 6 commits intomasterfrom
feat/gateway-api
Open

feat(metal-control-plane): add GatewayAPI support#156
l0wl3vel wants to merge 6 commits intomasterfrom
feat/gateway-api

Conversation

@l0wl3vel
Copy link
Copy Markdown
Contributor

@l0wl3vel l0wl3vel commented Apr 28, 2026

Description

Add GatewayAPI support to metal-control-plane

Used AI-Tools ✨

  • none used for generation

Closes #157

References: metal-stack/metal-roles#562

Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
@l0wl3vel l0wl3vel requested a review from a team as a code owner April 28, 2026 10:08
Copy link
Copy Markdown
Contributor

@Gerrit91 Gerrit91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking on this topic. PR looks good!

Can you please reference the umbrella issue in metal-roles in the PR description?

As far as I know we have not documented anything or discussed / decided on how the migration will take place. Can we elaborate a bit on this topic somewhere? Because maybe we need to write something to the release notes. Is this already running somewhere? With which implementation? Would be nice if this would run in the mini-lab, I think?

Comment on lines +27 to +29
# Although metal-apiservers serves GRPC traffic we are using a HTTPRoute
# because we do not require any grpc features
# https://gateway-api.sigs.k8s.io/api-types/grpcroute/#when-to-use-grpcroute
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an expert on the GRPCRoute resource but since we're using Connect RPC in the metal-apiserver, I would guess that we even need to use HTTPRoute in order to expose all Connect functionality? Clients could also speak for example grpcweb protocol and stuff, would this work with GRPCRoute?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, first time for me working with GRPCRoutes. Going to look into it

Copy link
Copy Markdown
Contributor Author

@l0wl3vel l0wl3vel May 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so we use connectrpc, which serves multiple protocols at the same time. If we intend to support non-gRPC clients we cannot use GRPCRoutes anyway. And GatewayAPI does not support cross-serving GRPCRoutes and HTTPRoutes on the same hostname.

So HTTPRoute it is.

What is the plan with the metal-api gRPC endpoint? Do we support non-gRPC clients there as well? We currently terminate TLS in the application and I would like to create a follow up ticket to move that endpoint to either an HTTPRoute or GRPCRoute so we can terminate all TLS connections on the gateway.

@l0wl3vel
Copy link
Copy Markdown
Contributor Author

l0wl3vel commented Apr 28, 2026

Thanks for taking on this topic. PR looks good!

Can you please reference the umbrella issue in metal-roles in the PR description?

As far as I know we have not documented anything or discussed / decided on how the migration will take place. Can we elaborate a bit on this topic somewhere? Because maybe we need to write something to the release notes. Is this already running somewhere? With which implementation? Would be nice if this would run in the mini-lab, I think?

Sure, going to add that to the umbrella.

The plan is to add the required functionality for GatewayAPI to all roles,charts and the mini-lab in addition to ingress and the ingress-nginx tcp exposure we are doing right now in mini-lab. GatewayAPI will be disabled by default in the roles and charts. This way operators can migrate gradually and switch over one service at a time, if they would like.

I would like to enable GatewayAPI in the mini-lab by default as soon as everything is ready so we get some mileage before rolling it out to real clusters.

I am developing this using mini-lab, so there is going to be a reference implementation using envoy-gateway on top of cloud-provider-kind/ for LoadBalancer Services.

@Gerrit91
Copy link
Copy Markdown
Contributor

Thanks, sounds good to me.

Two more questions:

  1. For the migration is it planned that operators deploy both resource types (ingress + gateway) and then point their DNS entry to the new gateway controller?
  2. If there was a mini-lab PR that I can use for trying this out, it would be easier for me to verify this PR. Do you think it's possible to create one for this purpose?

@l0wl3vel
Copy link
Copy Markdown
Contributor Author

Yes, the goal is to have gatewayapi behave in the same way as our current ingress setup. Operators should be able to deploy both and only have to adjust their DNS records to point to the gateway(s).

The mini-lab PR is not ready yet. Going to set this PR to draft and ping you when it is ready. Sorry for the disturbance.

@l0wl3vel l0wl3vel marked this pull request as draft April 28, 2026 13:29
@Gerrit91
Copy link
Copy Markdown
Contributor

Thanks a lot!

@iljarotar iljarotar moved this to In Progress in Development May 4, 2026
l0wl3vel added 3 commits May 4, 2026 14:54
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
@l0wl3vel l0wl3vel marked this pull request as ready for review May 4, 2026 16:04
l0wl3vel added 2 commits May 5, 2026 18:38
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Implement GatewayAPI support

3 participants