Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split flyte-binary services into http and grpc, and some cleanups #3495

Merged
merged 2 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 31 additions & 19 deletions charts/flyte-binary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,32 +93,44 @@ Chart for basic single Flyte executable deployment
| deployment.waitForDB.image.tag | string | `"15-alpine"` | |
| fullnameOverride | string | `""` | |
| ingress.commonAnnotations | object | `{}` | |
| ingress.commonLabels | object | `{}` | |
| ingress.create | bool | `false` | |
| ingress.grpcAnnotations | object | `{}` | |
| ingress.grpcExtraPaths.append | list | `[]` | |
| ingress.grpcExtraPaths.prepend | list | `[]` | |
| ingress.grpc.annotations | object | `{}` | |
| ingress.grpc.extraPaths.append | list | `[]` | |
| ingress.grpc.extraPaths.prepend | list | `[]` | |
| ingress.grpc.labels | object | `{}` | |
| ingress.host | string | `""` | |
| ingress.httpAnnotations | object | `{}` | |
| ingress.httpExtraPaths.append | list | `[]` | |
| ingress.httpExtraPaths.prepend | list | `[]` | |
| ingress.labels | object | `{}` | |
| ingress.http.annotations | object | `{}` | |
| ingress.http.extraPaths.append | list | `[]` | |
| ingress.http.extraPaths.prepend | list | `[]` | |
| ingress.http.labels | object | `{}` | |
| nameOverride | string | `""` | |
| rbac.annotations | object | `{}` | |
| rbac.create | bool | `true` | |
| rbac.extraRules | list | `[]` | |
| rbac.labels | object | `{}` | |
| service.annotations | object | `{}` | |
| service.clusterIP | string | `""` | |
| service.externalTrafficPolicy | string | `"Cluster"` | |
| service.extraPorts | list | `[]` | |
| service.labels | object | `{}` | |
| service.loadBalancerIP | string | `""` | |
| service.loadBalancerSourceRanges | list | `[]` | |
| service.nodePorts.grpc | string | `""` | |
| service.nodePorts.http | string | `""` | |
| service.ports.grpc | string | `""` | |
| service.ports.http | string | `""` | |
| service.type | string | `"ClusterIP"` | |
| service.commonAnnotations | object | `{}` | |
| service.commonLabels | object | `{}` | |
| service.grpc.annotations | object | `{}` | |
| service.grpc.clusterIP | string | `""` | |
| service.grpc.externalTrafficPolicy | string | `"Cluster"` | |
| service.grpc.extraPorts | list | `[]` | |
| service.grpc.labels | object | `{}` | |
| service.grpc.loadBalancerIP | string | `""` | |
| service.grpc.loadBalancerSourceRanges | list | `[]` | |
| service.grpc.nodePort | string | `""` | |
| service.grpc.port | string | `""` | |
| service.grpc.type | string | `"ClusterIP"` | |
| service.http.annotations | object | `{}` | |
| service.http.clusterIP | string | `""` | |
| service.http.externalTrafficPolicy | string | `"Cluster"` | |
| service.http.extraPorts | list | `[]` | |
| service.http.labels | object | `{}` | |
| service.http.loadBalancerIP | string | `""` | |
| service.http.loadBalancerSourceRanges | list | `[]` | |
| service.http.nodePort | string | `""` | |
| service.http.port | string | `""` | |
| service.http.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.labels | object | `{}` | |
Expand Down
22 changes: 18 additions & 4 deletions charts/flyte-binary/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,32 @@ Get the Flyte cluster resource templates ConfigMap name.
{{- printf "%s-cluster-resource-templates" (include "flyte-binary.fullname" .) -}}
{{- end -}}

{{/*
Get the Flyte HTTP service name
*/}}
{{- define "flyte-binary.service.http.name" -}}
{{- printf "%s-http" (include "flyte-binary.fullname" .) -}}
{{- end -}}

{{/*
Get the Flyte GRPC service name
*/}}
{{- define "flyte-binary.service.grpc.name" -}}
{{- printf "%s-grpc" (include "flyte-binary.fullname" .) -}}
{{- end -}}

{{/*
Get the Flyte service HTTP port.
*/}}
{{- define "flyte-binary.service.httpPort" -}}
{{- default 8088 .Values.service.ports.http -}}
{{- define "flyte-binary.service.http.port" -}}
{{- default 8088 .Values.service.http.port -}}
{{- end -}}

{{/*
Get the Flyte service GRPC port.
*/}}
{{- define "flyte-binary.service.grpcPort" -}}
{{- default 8089 .Values.service.ports.grpc -}}
{{- define "flyte-binary.service.grpc.port" -}}
{{- default 8089 .Values.service.grpc.port -}}
{{- end -}}

{{/*
Expand Down
8 changes: 4 additions & 4 deletions charts/flyte-binary/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ data:
{{- if .Values.configuration.auth.authorizedUris }}
{{- tpl ( .Values.configuration.auth.authorizedUris | toYaml ) . | nindent 6 }}
{{- end }}
- http://{{ include "flyte-binary.fullname" . }}:{{ include "flyte-binary.service.httpPort" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}:{{ include "flyte-binary.service.httpPort" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}.svc:{{ include "flyte-binary.service.httpPort" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ include "flyte-binary.service.httpPort" . }}
- http://{{ include "flyte-binary.fullname" . }}:{{ include "flyte-binary.service.http.port" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}:{{ include "flyte-binary.service.http.port" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}.svc:{{ include "flyte-binary.service.http.port" . }}
- http://{{ include "flyte-binary.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ include "flyte-binary.service.http.port" . }}
userAuth:
openId:
baseUrl: {{ required "OIDC base URL required when authentication is enabled" .Values.configuration.auth.oidc.baseUrl | quote }}
Expand Down
67 changes: 35 additions & 32 deletions charts/flyte-binary/templates/ingress/grpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ metadata:
{{- if .Values.commonLabels }}
{{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }}
{{- end }}
{{- if .Values.ingress.labels }}
{{- tpl ( .Values.ingress.labels | toYaml ) . | nindent 4 }}
{{- if .Values.ingress.commonLabels }}
{{- tpl ( .Values.ingress.commonLabels | toYaml ) . | nindent 4 }}
{{- end }}
{{- if .Values.ingress.grpc.abels }}
{{- tpl ( .Values.ingress.grpc.labels | toYaml ) . | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
Expand All @@ -18,102 +21,102 @@ metadata:
{{- if .Values.ingress.commonAnnotations }}
{{- tpl ( .Values.ingress.commonAnnotations | toYaml ) . | nindent 4 }}
{{- end }}
{{- if .Values.ingress.grpcAnnotations }}
{{- tpl ( .Values.ingress.grpcAnnotations | toYaml ) . | nindent 4 }}
{{- if .Values.ingress.grpc.annotations }}
{{- tpl ( .Values.ingress.grpc.annotations | toYaml ) . | nindent 4 }}
{{- end }}
spec:
rules:
- http:
paths:
{{- if .Values.ingress.grpcExtraPaths.prepend }}
{{- tpl ( .Values.ingress.grpcExtraPaths.prepend | toYaml ) . | nindent 6 }}
{{- if .Values.ingress.grpc.extraPaths.prepend }}
{{- tpl ( .Values.ingress.grpc.extraPaths.prepend | toYaml ) . | nindent 6 }}
{{- end }}
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.AdminService
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.AdminService/*
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.DataProxyService
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.DataProxyService/*
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.AuthMetadataService
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.AuthMetadataService/*
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.IdentityService
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.IdentityService/*
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /grpc.health.v1.Health
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /grpc.health.v1.Health/*
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.SignalService
pathType: ImplementationSpecific
- backend:
service:
name: {{ include "flyte-binary.fullname" . }}
name: {{ include "flyte-binary.service.grpc.name" . }}
port:
number: {{ include "flyte-binary.service.grpcPort" . }}
number: {{ include "flyte-binary.service.grpc.port" . }}
path: /flyteidl.service.SignalService/*
pathType: ImplementationSpecific
{{- if .Values.ingress.grpcExtraPaths.append }}
{{- tpl ( .Values.ingress.grpcExtraPaths.append | toYaml ) . | nindent 6 }}
{{- if .Values.ingress.grpc.extraPaths.append }}
{{- tpl ( .Values.ingress.grpc.extraPaths.append | toYaml ) . | nindent 6 }}
{{- end }}
{{- if .Values.ingress.host }}
host: {{ tpl .Values.ingress.host . | quote }}
Expand Down
Loading