akash-network / support

Akash Support and Issue Tracking
5 stars 3 forks source link

[Feature request] provider: add gRPC support for the tenant deployments #118

Open andy108369 opened 10 months ago

andy108369 commented 10 months ago

This is simple to do on the K8s level => the ingress (K8s resource) requires nginx.ingress.kubernetes.io/backend-protocol: GRPC annotation to be set for the GRPC deployments.

This is the magic ingredient that sets up the appropriate nginx configuration to route http/2 traffic to the grpc service.

For the Akash Provider - this should be configurable not just per the specific port, but per host specified in accept (!) And for the default / global Ingress Host (<uri>) -- there should be an option too.

Refs. https://kubernetes.github.io/ingress-nginx/examples/grpc/

Note that ssl-redirect annotation is not required since ingress-nginx already offers all 80/tcp (HTTP) endpoints over 443/tcp (HTTPS) by default.

Extra

The following bits can be used for adding it to the docs.akash.network

Cloudflare

Additionally, the gRPC should be enabled in Cloudflare -> Network -> gRPC (tick enable) if tenants use Cloudflare for the TLS termination.

Traefik

With traefik, tenants would only need to specify h2c scheme. Here is a working example:

  services:
    grpc:
      loadBalancer:
        servers:
          - url: "h2c://node:9090" # Use h2c for HTTP/2