I am trying to configure an istio GateWay with two different protocols (GRPC and HTTP)
Right now, I have two different gateways one each for GRPC and HTTP as below
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gwgrpc
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 7878
name: http
protocol: GRPC
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gwrest
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 7979
name: http
protocol: HTTP
hosts:
- "*"
Is it possible to use same gateway with different protocols and ports?
You should be able to combine the two Gateways. The only problem is that both your ports have the same name. Something like this should work.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gwgrpc
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 7878
name: grpc
protocol: GRPC
hosts:
- "*"
- port:
number: 7979
name: http
protocol: HTTP
hosts:
- "*"