projectcontour / gimbal

Gimbal is an ingress load balancing platform capable of routing traffic to multiple Kubernetes and OpenStack clusters. Built by Heptio in partnership with Actapio.
https://github.com/projectcontour/gimbal
Apache License 2.0
661 stars 92 forks source link

Can a http/2 gRPC application connect through envoy/heptio? #262

Open hmorikaw opened 5 years ago

hmorikaw commented 5 years ago

Describe the solution you'd like We are operating Gimbal cluster in our private cloud and got a request to get Gimbal support gRPC (http2) based endpoints as well.

Manually change the services discovered by Gimbal discoverer to support gRPC backends will work temporally. Here is the example displaying what they do by hand.

$ cat loadbalancer-service.yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    contour.heptio.com/upstream-protocol.h2: 8080,port-8080 // <- Here!!
  labels:
    gimbal.heptio.com/backend: openstack-cluster
    gimbal.heptio.com/load-balancer-id: loadblancer-uuid
    gimbal.heptio.com/load-balancer-name: grpc-http2
    gimbal.heptio.com/service: loadbalancer-service
  name: openstack-cluster-service-uuid
  namespace: loadbalancer-namespace
spec:
  clusterIP: None
  ports:
  - name: port-8080
    port: 8080
    protocol: TCP
    targetPort: 8080
  sessionAffinity: None
  type: ClusterIP

But the services discovered by Gimbal discoverer are overwritten on the next cycle of discovery. To make this happen without manual changes, we are expecting that ingressRoute has a functionality to support gRPC. If you know how to do it, let us know please.

Environment:

alexbrand commented 5 years ago

Hey @hmorikaw, are you updating the service definition in the gimbal cluster or in the backend cluster? Or is this an OpenStack service?

hmorikaw commented 5 years ago

@alexbrand I updated the service definition in the gimbal cluster.

I updated the Gimbal service yaml file, which was created by the Gimbal discoverer, in loadbalancer-namespace namespace.

$ kubectl get ns
NAME               STATUS   AGE
default            Active   31d
gimbal-contour     Active   17d
gimbal-discovery   Active   17d
kube-public        Active   31d
kube-system        Active   31d
loadbalancer-namespace  Active   19d // <= I updated the service definition in this namespace

$ kubectl get svc -n loadbalancer-namespace
NAME                                                   TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)    AGE
openstack-cluster-service-uuid   ClusterIP   None         <none>        8080/TCP   17d