From 46864a53614458a61b9190f2975106dc7fe46cab Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Sun, 31 Jan 2021 12:29:20 -0800 Subject: [PATCH] Access GRPC services using projectcontour (#686) --- deployment/eks/flyte_generated.yaml | 2 +- deployment/gcp/flyte_generated.yaml | 2 +- deployment/sandbox/flyte_generated.yaml | 3 ++- deployment/test/flyte_generated.yaml | 2 +- kustomize/base/admindeployment/service.yaml | 3 ++- .../contour_ingress_controller/contour.yaml | 1 + .../contour_ingress_controller/service.yaml | 16 ++++++++++++++++ 7 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 kustomize/overlays/sandbox/dependencies/contour_ingress_controller/service.yaml diff --git a/deployment/eks/flyte_generated.yaml b/deployment/eks/flyte_generated.yaml index a83107f171..033469ba46 100644 --- a/deployment/eks/flyte_generated.yaml +++ b/deployment/eks/flyte_generated.yaml @@ -8365,8 +8365,8 @@ apiVersion: v1 kind: Service metadata: annotations: - contour.heptio.com/upstream-protocol.h2c: grpc external-dns.alpha.kubernetes.io/hostname: flyteadmin.subdomain.mydomain.com + projectcontour.io/upstream-protocol.h2c: grpc service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "600" service.beta.kubernetes.io/aws-load-balancer-extra-security-groups: sg-...,sg-...,sg-... name: flyteadmin diff --git a/deployment/gcp/flyte_generated.yaml b/deployment/gcp/flyte_generated.yaml index edcd65825f..9c6f920f52 100644 --- a/deployment/gcp/flyte_generated.yaml +++ b/deployment/gcp/flyte_generated.yaml @@ -8382,7 +8382,7 @@ kind: Service metadata: annotations: cloud.google.com/load-balancer-type: Internal - contour.heptio.com/upstream-protocol.h2c: grpc + projectcontour.io/upstream-protocol.h2c: grpc name: flyteadmin namespace: flyte spec: diff --git a/deployment/sandbox/flyte_generated.yaml b/deployment/sandbox/flyte_generated.yaml index eebd30ab39..9899538a01 100644 --- a/deployment/sandbox/flyte_generated.yaml +++ b/deployment/sandbox/flyte_generated.yaml @@ -9863,6 +9863,7 @@ spec: externalTrafficPolicy: Local ports: - name: http + nodePort: 30081 port: 80 protocol: TCP - name: https @@ -9876,7 +9877,7 @@ apiVersion: v1 kind: Service metadata: annotations: - contour.heptio.com/upstream-protocol.h2c: grpc + projectcontour.io/upstream-protocol.h2c: grpc name: flyteadmin namespace: flyte spec: diff --git a/deployment/test/flyte_generated.yaml b/deployment/test/flyte_generated.yaml index 09d986a834..47905d69e4 100644 --- a/deployment/test/flyte_generated.yaml +++ b/deployment/test/flyte_generated.yaml @@ -677,7 +677,7 @@ apiVersion: v1 kind: Service metadata: annotations: - contour.heptio.com/upstream-protocol.h2c: grpc + projectcontour.io/upstream-protocol.h2c: grpc name: flyteadmin namespace: flyte spec: diff --git a/kustomize/base/admindeployment/service.yaml b/kustomize/base/admindeployment/service.yaml index bbff382fff..275f1d2185 100644 --- a/kustomize/base/admindeployment/service.yaml +++ b/kustomize/base/admindeployment/service.yaml @@ -9,7 +9,8 @@ metadata: # with the name 'grpc' under spec/ports. # For more information, refer to # https://github.com/heptio/contour/blob/master/docs/annotations.md#contour-specific-service-annotations - contour.heptio.com/upstream-protocol.h2c: "grpc" + # # Following this issue - the annotation was updated https://github.com/projectcontour/contour/issues/2092 + projectcontour.io/upstream-protocol.h2c: "grpc" spec: selector: app: flyteadmin diff --git a/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/contour.yaml b/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/contour.yaml index fb6782a46a..499f77f0b0 100644 --- a/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/contour.yaml +++ b/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/contour.yaml @@ -1631,6 +1631,7 @@ spec: - port: 80 name: http protocol: TCP + nodePort: 30081 - port: 443 name: https protocol: TCP diff --git a/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/service.yaml b/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/service.yaml new file mode 100644 index 0000000000..79e68127b1 --- /dev/null +++ b/kustomize/overlays/sandbox/dependencies/contour_ingress_controller/service.yaml @@ -0,0 +1,16 @@ +# Service +apiVersion: v1 +kind: Service +metadata: + name: contour + labels: + app: contour +spec: + # use NodePort to make sure the service is accessible + type: NodePort + selector: + app: contour + ports: + - protocol: TCP + port: 80 + nodePort: 30081