diff --git a/charts/flyte-binary/README.md b/charts/flyte-binary/README.md index 8f855666f6a..679f1154715 100644 --- a/charts/flyte-binary/README.md +++ b/charts/flyte-binary/README.md @@ -129,18 +129,6 @@ Chart for basic single Flyte executable deployment | ingress.grpcExtraPaths.append | list | `[]` | | | ingress.grpcExtraPaths.prepend | list | `[]` | | | ingress.grpcIngressClassName | string | `""` | | -| ingress.grpcPaths[0] | string | `"/flyteidl.service.AdminService"` | | -| ingress.grpcPaths[10] | string | `"/flyteidl.service.SignalService"` | | -| ingress.grpcPaths[11] | string | `"/flyteidl.service.SignalService/*"` | | -| ingress.grpcPaths[1] | string | `"/flyteidl.service.AdminService/*"` | | -| ingress.grpcPaths[2] | string | `"/flyteidl.service.DataProxyService"` | | -| ingress.grpcPaths[3] | string | `"/flyteidl.service.DataProxyService/*"` | | -| ingress.grpcPaths[4] | string | `"/flyteidl.service.AuthMetadataService"` | | -| ingress.grpcPaths[5] | string | `"/flyteidl.service.AuthMetadataService/*"` | | -| ingress.grpcPaths[6] | string | `"/flyteidl.service.IdentityService"` | | -| ingress.grpcPaths[7] | string | `"/flyteidl.service.IdentityService/*"` | | -| ingress.grpcPaths[8] | string | `"/grpc.health.v1.Health"` | | -| ingress.grpcPaths[9] | string | `"/grpc.health.v1.Health/*"` | | | ingress.grpcTls | list | `[]` | | | ingress.host | string | `""` | | | ingress.httpAnnotations | object | `{}` | | diff --git a/charts/flyte-binary/templates/_helpers.tpl b/charts/flyte-binary/templates/_helpers.tpl index 92e8fa4636b..85184a45dbc 100644 --- a/charts/flyte-binary/templates/_helpers.tpl +++ b/charts/flyte-binary/templates/_helpers.tpl @@ -176,6 +176,24 @@ Get the Flyte service GRPC port. {{- default 8089 .Values.service.ports.grpc -}} {{- end -}} +{{/* +Get the Flyte service GRPC paths. +*/}} +{{- define "flyte-binary.ingress.grpcPaths" -}} +- /flyteidl.service.AdminService +- /flyteidl.service.AdminService/* +- /flyteidl.service.AuthMetadataService +- /flyteidl.service.AuthMetadataService/ +- /flyteidl.service.DataProxyService +- /flyteidl.service.DataProxyService/* +- /flyteidl.service.IdentityService +- /flyteidl.service.IdentityService/* +- /flyteidl.service.SignalService +- /flyteidl.service.SignalService/* +- /grpc.health.v1.Health +- /grpc.health.v1.Health/* +{{- end -}} + {{/* Get the Flyte agent service GRPC port. */}} diff --git a/charts/flyte-binary/templates/ingress/grpc.yaml b/charts/flyte-binary/templates/ingress/grpc.yaml index e41a5cc95cd..37b32f5b1cd 100644 --- a/charts/flyte-binary/templates/ingress/grpc.yaml +++ b/charts/flyte-binary/templates/ingress/grpc.yaml @@ -1,4 +1,5 @@ {{- if and .Values.ingress.create .Values.ingress.separateGrpcIngress }} +{{- $paths := (include "flyte-binary.ingress.grpcPaths" .) | fromYamlArray -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -38,8 +39,8 @@ spec: {{- if .Values.ingress.grpcExtraPaths.prepend }} {{- tpl ( .Values.ingress.grpcExtraPaths.prepend | toYaml ) . | nindent 6 }} {{- end }} - {{- range .Values.ingress.grpcPaths }} - - path: {{ . }} + {{- range $path := $paths }} + - path: {{ $path }} {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific {{- end }} diff --git a/charts/flyte-binary/templates/ingress/http.yaml b/charts/flyte-binary/templates/ingress/http.yaml index e74da34d014..6891c79f056 100644 --- a/charts/flyte-binary/templates/ingress/http.yaml +++ b/charts/flyte-binary/templates/ingress/http.yaml @@ -175,21 +175,15 @@ spec: path: /oauth2/* pathType: ImplementationSpecific {{- if not .Values.ingress.separateGrpcIngress }} - {{- range .Values.ingress.grpcPaths }} - - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + {{- $paths := (include "flyte-binary.ingress.grpcPaths" .) | fromYamlArray -}} + {{- range $path := $paths }} + - path: {{ $path }} + pathType: ImplementationSpecific + backend: service: - name: {{ include "flyte-binary.service.http.name" $ }} + name: {{ include "flyte-binary.service.grpc.name" $ }} port: number: {{ include "flyte-binary.service.grpc.port" $ }} - {{- else }} - serviceName: {{ include "flyte-binary.service.http.name" $ }} - servicePort: {{ include "flyte-binary.service.grpc.port" $ }} - {{- end }} - path: {{ . }} - {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} - pathType: ImplementationSpecific - {{- end }} {{- end }} {{- end }} {{- if .Values.ingress.httpExtraPaths.append }} diff --git a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml index 46ef7872c5d..6f1d7e58ab7 100644 --- a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml +++ b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml @@ -415,3 +415,239 @@ spec: name: flyte-flyte-binary-config-secret - name: state emptyDir: {} +--- +# Source: flyte-binary/templates/ingress/http.yaml +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: flyte-flyte-binary-http + namespace: "flyte" + labels: + helm.sh/chart: flyte-binary-v0.1.10 + app.kubernetes.io/name: flyte-binary + app.kubernetes.io/instance: flyte + app.kubernetes.io/version: "1.16.0" + app.kubernetes.io/managed-by: Helm + annotations: + nginx.ingress.kubernetes.io/backend-protocol: "GRPC" +spec: + rules: + - http: + paths: + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /console + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /console/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /api + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /api/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /healthcheck + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /v1/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /.well-known + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /.well-known/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /login + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /login/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /logout + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /logout/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /callback + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /callback/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /me + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /config + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /config/* + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /oauth2 + pathType: ImplementationSpecific + - backend: + service: + name: flyte-flyte-binary-http + port: + number: 8088 + path: /oauth2/* + pathType: ImplementationSpecific + - path: /flyteidl.service.AdminService + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.AdminService/* + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.DataProxyService + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.DataProxyService/* + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.AuthMetadataService + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.AuthMetadataService/ + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.IdentityService + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.IdentityService/* + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /grpc.health.v1.Health + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /grpc.health.v1.Health/* + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.SignalService + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089 + - path: /flyteidl.service.SignalService/* + pathType: ImplementationSpecific + backend: + service: + name: flyte-flyte-binary-grpc + port: + number: 8089