-
Notifications
You must be signed in to change notification settings - Fork 659
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
[flyte-core] Create separate grpc service for flyteadmin #5168
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- if and .Values.flyteadmin.enabled .Values.common.ingress.separateGrpcIngress }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "flyteadmin.service.grpc.name" .}} | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteadmin.labels" . | nindent 4 }} | ||
{{- if or .Values.flyteadmin.service.annotations .Values.flyteadmin.service.grpcAnnotations }} | ||
annotations: | ||
{{- if .Values.flyteadmin.service.annotations }} | ||
{{- tpl ( .Values.flyteadmin.service.annotations | toYaml ) . | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.flyteadmin.service.grpcAnnotations }} | ||
{{- tpl ( .Values.flyteadmin.service.grpcAnnotations | toYaml ) . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.flyteadmin.service.type}} | ||
type: {{ . }} | ||
{{- end }} | ||
{{- with .Values.flyteadmin.service.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{ . }} | ||
{{- end }} | ||
ports: | ||
- name: grpc | ||
port: {{ include "flyteadmin.service.grpc.port" . }} | ||
protocol: TCP | ||
targetPort: grpc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this one be |
||
selector: {{ include "flyteadmin.selectorLabels" . | nindent 4 }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,14 @@ metadata: | |
name: {{ template "flyteadmin.name" . }} | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteadmin.labels" . | nindent 4 }} | ||
{{- with .Values.flyteadmin.service.annotations }} | ||
annotations: {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- if or .Values.flyteadmin.service.annotations .Values.flyteadmin.service.httpAnnotations }} | ||
annotations: | ||
{{- if .Values.flyteadmin.service.annotations }} | ||
{{- tpl ( .Values.flyteadmin.service.annotations | toYaml ) . | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.flyteadmin.service.httpAnnotations }} | ||
{{- tpl ( .Values.flyteadmin.service.httpAnnotations | toYaml ) . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.flyteadmin.service.type}} | ||
|
@@ -18,19 +24,20 @@ spec: | |
{{- end }} | ||
ports: | ||
- name: http | ||
port: 80 | ||
port: {{ include "flyteadmin.service.http.port" . }} | ||
protocol: TCP | ||
targetPort: 8088 | ||
- name: grpc | ||
port: 81 | ||
protocol: TCP | ||
targetPort: 8089 | ||
targetPort: http | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow, shouldn't this one be |
||
- name: redoc | ||
protocol: TCP | ||
port: 87 | ||
targetPort: 8087 | ||
- name: http-metrics | ||
protocol: TCP | ||
port: 10254 | ||
{{- if not .Values.common.ingress.separateGrpcIngress }} | ||
- name: grpc | ||
port: {{ include "flyteadmin.service.grpc.port" . }} | ||
targetPort: grpc | ||
{{- end }} | ||
selector: {{ include "flyteadmin.selectorLabels" . | nindent 4 }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,24 @@ | ||
{{- define "grpcRoutes" -}} | ||
{{- $grpcPort := 81 -}} | ||
{{- if eq .Values.configmap.adminServer.server.security.secure true -}} | ||
{{- $grpcPort = 80 -}} | ||
{{- end }} | ||
# NOTE: Port 81 in flyteadmin is the GRPC server port for FlyteAdmin. | ||
- path: /flyteidl.service.SignalService | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.SignalService/* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.AdminService | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.AdminService/* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.DataProxyService | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.DataProxyService/* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.AuthMetadataService | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.AuthMetadataService/* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.IdentityService | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /flyteidl.service.IdentityService/* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /grpc.health.v1.Health | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: flyteadmin | ||
port: | ||
number: {{ $grpcPort }} | ||
- path: /grpc.health.v1.Health/* | ||
{{- $paths := (include "flyteadmin.ingress.grpcPaths" .) | fromYamlArray }} | ||
{{- range $path := $paths }} | ||
- path: {{ $path }} | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not quite sure |
||
pathType: ImplementationSpecific | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: flyteadmin | ||
name: {{ include "flyteadmin.service.grpc.name" $ }} | ||
port: | ||
number: {{ $grpcPort }} | ||
{{- end }} | ||
{{- if .Values.common.ingress.enabled }} | ||
number: {{ include "flyteadmin.service.grpc.port" $ }} | ||
{{- else }} | ||
serviceName: {{ include "flyteadmin.service.grpc.name" $ }} | ||
servicePort: {{ include "flyteadmin.service.grpc.port" $ }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.common.ingress.enabled }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,8 +50,11 @@ flyteadmin: | |
- flyteexamples | ||
# -- Service settings for Flyteadmin | ||
service: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see the Values.common.ingress.separateGrpcIngress key added to values |
||
annotations: | ||
projectcontour.io/upstream-protocol.h2c: grpc | ||
annotations: {} | ||
httpAnnotations: {} | ||
grpcAnnotations: {} | ||
# projectcontour.io/upstream-protocol.h2c: grpc | ||
# traefik.ingress.kubernetes.io/service.serversscheme: h2c | ||
type: ClusterIP | ||
loadBalancerSourceRanges: [] | ||
# -- Configuration for service accounts for FlyteAdmin | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone needs to override this? I guess putting it into a template would complicate it