microsoft / microsoft/aspire

Support adding of gRPC Routes for Kubernetes Gateway Api Resource

Open
#18,430 1 comment 0 reactions 0 assignees View on GitHub
needs-area-label triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I would like to create not only http Routes. My current problem is that I have an Zitadel instance as IdP and I want to talk to its management api via gRPC.

### Describe the solution you'd like

Imagine I have some AppHost Programm.cs code like:
```
var testGateway = k8s.AddGateway("test-gateway")
.WithGatewayClass(gatewayClass)
.WithHostname("*.test.me")
...
.WithTls();

var zitadel = ... // Could be any other backend inside the cluster

testGateway.WithRoute("auth.test.me", "/", zitadel, kind: GatewayRouteKind.GRPC); // default could stay as GatewayRouteKind.HTTP
```

would then create a yaml like:
```
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {referenceName}-grpc-route
namespace: {namespace}
spec:
parentRefs:
- name: {gatewayName}
sectionName: https
hostnames:
- auth.test.me
rules:
- backendRefs:
- name: {referenceName}
port: 8080
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start from the AppHost Program.cs example using AddGateway, WithGatewayClass, WithHostname, WithTls, and WithRoute. Trace how GatewayRouteKind.HTTP is handled and compare the requested GRPCRoute YAML; done means a gRPC route can be configured and produces the shown Gateway API resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, grpc, kubernetes
Domain
api, cloud, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.