From a53d8f0a42844f9e148d03f105531a55a93c345a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-R=C3=A9my=20Bancel?= Date: Thu, 20 Aug 2020 17:08:44 -0700 Subject: [PATCH] Add new local Gateway sharing same deployment as ingress Gateway. --- config/203-local-gateway.yaml | 36 ++++++++++++++++++++++++++ pkg/reconciler/ingress/config/istio.go | 10 ++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/config/203-local-gateway.yaml b/config/203-local-gateway.yaml index 5ed74e3a00..a25fc5fffb 100644 --- a/config/203-local-gateway.yaml +++ b/config/203-local-gateway.yaml @@ -33,3 +33,39 @@ spec: protocol: HTTP hosts: - "*" +--- +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: knative-local-gateway + namespace: knative-serving + labels: + serving.knative.dev/release: devel + networking.knative.dev/ingress-provider: istio +spec: + selector: + istio: ingressgateway + servers: + - port: + number: 8081 + name: http + protocol: HTTP + hosts: + - "*" +--- +apiVersion: v1 +kind: Service +metadata: + name: knative-local-gateway + namespace: knative-serving + labels: + serving.knative.dev/release: devel + networking.knative.dev/ingress-provider: istio +spec: + type: ClusterIP + selector: + istio: ingressgateway + ports: + - name: http2 + port: 80 + targetPort: 8081 diff --git a/pkg/reconciler/ingress/config/istio.go b/pkg/reconciler/ingress/config/istio.go index 3cbf40f379..cc77a70e86 100644 --- a/pkg/reconciler/ingress/config/istio.go +++ b/pkg/reconciler/ingress/config/istio.go @@ -41,8 +41,11 @@ const ( // KnativeIngressGateway is the name of the ingress gateway KnativeIngressGateway = "knative-ingress-gateway" - // ClusterLocalGateway is the name of the local gateway + // ClusterLocalGateway is the name of the local gateway (will be deprecated) ClusterLocalGateway = "cluster-local-gateway" + + // KnativeLocalGateway is the name of the local gateway (will be promoted) + KnativeLocalGateway = "knative-local-gateway" ) func defaultIngressGateways() []Gateway { @@ -60,6 +63,11 @@ func defaultLocalGateways() []Gateway { Name: ClusterLocalGateway, ServiceURL: fmt.Sprintf(ClusterLocalGateway+".istio-system.svc.%s", network.GetClusterDomainName()), + }, { + Namespace: system.Namespace(), + Name: KnativeLocalGateway, + ServiceURL: fmt.Sprintf(KnativeLocalGateway+".knative-serving.svc.%s", + network.GetClusterDomainName()), }} }