diff --git a/charts/flyte-binary/README.md b/charts/flyte-binary/README.md index 1eb0f32ed8..bad7b5bc7d 100644 --- a/charts/flyte-binary/README.md +++ b/charts/flyte-binary/README.md @@ -93,44 +93,32 @@ 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.grpc.annotations | object | `{}` | | -| ingress.grpc.extraPaths.append | list | `[]` | | -| ingress.grpc.extraPaths.prepend | list | `[]` | | -| ingress.grpc.labels | object | `{}` | | +| ingress.grpcAnnotations | object | `{}` | | +| ingress.grpcExtraPaths.append | list | `[]` | | +| ingress.grpcExtraPaths.prepend | list | `[]` | | | ingress.host | string | `""` | | -| ingress.http.annotations | object | `{}` | | -| ingress.http.extraPaths.append | list | `[]` | | -| ingress.http.extraPaths.prepend | list | `[]` | | -| ingress.http.labels | object | `{}` | | +| ingress.httpAnnotations | object | `{}` | | +| ingress.httpExtraPaths.append | list | `[]` | | +| ingress.httpExtraPaths.prepend | list | `[]` | | +| ingress.labels | object | `{}` | | | nameOverride | string | `""` | | | rbac.annotations | object | `{}` | | | rbac.create | bool | `true` | | | rbac.extraRules | list | `[]` | | | rbac.labels | object | `{}` | | -| 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"` | | +| 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"` | | | serviceAccount.annotations | object | `{}` | | | serviceAccount.create | bool | `true` | | | serviceAccount.labels | object | `{}` | | diff --git a/charts/flyte-binary/templates/_helpers.tpl b/charts/flyte-binary/templates/_helpers.tpl index a2005b4035..2ddcaf6911 100644 --- a/charts/flyte-binary/templates/_helpers.tpl +++ b/charts/flyte-binary/templates/_helpers.tpl @@ -138,32 +138,18 @@ 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.http.port" -}} -{{- default 8088 .Values.service.http.port -}} +{{- define "flyte-binary.service.httpPort" -}} +{{- default 8088 .Values.service.ports.http -}} {{- end -}} {{/* Get the Flyte service GRPC port. */}} -{{- define "flyte-binary.service.grpc.port" -}} -{{- default 8089 .Values.service.grpc.port -}} +{{- define "flyte-binary.service.grpcPort" -}} +{{- default 8089 .Values.service.ports.grpc -}} {{- end -}} {{/* diff --git a/charts/flyte-binary/templates/configmap.yaml b/charts/flyte-binary/templates/configmap.yaml index 50f75f2f13..6715cf17df 100644 --- a/charts/flyte-binary/templates/configmap.yaml +++ b/charts/flyte-binary/templates/configmap.yaml @@ -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.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" . }} + - 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" . }} userAuth: openId: baseUrl: {{ required "OIDC base URL required when authentication is enabled" .Values.configuration.auth.oidc.baseUrl | quote }} diff --git a/charts/flyte-binary/templates/ingress/grpc.yaml b/charts/flyte-binary/templates/ingress/grpc.yaml index ac6315c573..ac4fda8bda 100644 --- a/charts/flyte-binary/templates/ingress/grpc.yaml +++ b/charts/flyte-binary/templates/ingress/grpc.yaml @@ -8,11 +8,8 @@ metadata: {{- if .Values.commonLabels }} {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} {{- end }} - {{- 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 }} + {{- if .Values.ingress.labels }} + {{- tpl ( .Values.ingress.labels | toYaml ) . | nindent 4 }} {{- end }} annotations: {{- if .Values.commonAnnotations }} @@ -21,102 +18,102 @@ metadata: {{- if .Values.ingress.commonAnnotations }} {{- tpl ( .Values.ingress.commonAnnotations | toYaml ) . | nindent 4 }} {{- end }} - {{- if .Values.ingress.grpc.annotations }} - {{- tpl ( .Values.ingress.grpc.annotations | toYaml ) . | nindent 4 }} + {{- if .Values.ingress.grpcAnnotations }} + {{- tpl ( .Values.ingress.grpcAnnotations | toYaml ) . | nindent 4 }} {{- end }} spec: rules: - http: paths: - {{- if .Values.ingress.grpc.extraPaths.prepend }} - {{- tpl ( .Values.ingress.grpc.extraPaths.prepend | toYaml ) . | nindent 6 }} + {{- if .Values.ingress.grpcExtraPaths.prepend }} + {{- tpl ( .Values.ingress.grpcExtraPaths.prepend | toYaml ) . | nindent 6 }} {{- end }} - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.AdminService pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.AdminService/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.DataProxyService pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.DataProxyService/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.AuthMetadataService pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.AuthMetadataService/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.IdentityService pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.IdentityService/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /grpc.health.v1.Health pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /grpc.health.v1.Health/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.SignalService pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.grpc.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.grpc.port" . }} + number: {{ include "flyte-binary.service.grpcPort" . }} path: /flyteidl.service.SignalService/* pathType: ImplementationSpecific - {{- if .Values.ingress.grpc.extraPaths.append }} - {{- tpl ( .Values.ingress.grpc.extraPaths.append | toYaml ) . | nindent 6 }} + {{- if .Values.ingress.grpcExtraPaths.append }} + {{- tpl ( .Values.ingress.grpcExtraPaths.append | toYaml ) . | nindent 6 }} {{- end }} {{- if .Values.ingress.host }} host: {{ tpl .Values.ingress.host . | quote }} diff --git a/charts/flyte-binary/templates/ingress/http.yaml b/charts/flyte-binary/templates/ingress/http.yaml index 0d53f290dc..9591d15cb9 100644 --- a/charts/flyte-binary/templates/ingress/http.yaml +++ b/charts/flyte-binary/templates/ingress/http.yaml @@ -8,11 +8,8 @@ metadata: {{- if .Values.commonLabels }} {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} {{- end }} - {{- if .Values.ingress.commonLabels }} - {{- tpl ( .Values.ingress.commonLabels | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.ingress.http.abels }} - {{- tpl ( .Values.ingress.http.labels | toYaml ) . | nindent 4 }} + {{- if .Values.ingress.labels }} + {{- tpl ( .Values.ingress.labels | toYaml ) . | nindent 4 }} {{- end }} annotations: {{- if .Values.commonAnnotations }} @@ -21,151 +18,151 @@ metadata: {{- if .Values.ingress.commonAnnotations }} {{- tpl ( .Values.ingress.commonAnnotations | toYaml ) . | nindent 4 }} {{- end }} - {{- if .Values.ingress.http.annotations }} - {{- tpl ( .Values.ingress.http.annotations | toYaml ) . | nindent 4 }} + {{- if .Values.ingress.httpAnnotations }} + {{- tpl ( .Values.ingress.httpAnnotations | toYaml ) . | nindent 4 }} {{- end }} spec: rules: - http: paths: - {{- if .Values.ingress.http.extraPaths.prepend }} - {{- tpl ( .Values.ingress.http.extraPaths.prepend | toYaml ) . | nindent 6 }} + {{- if .Values.ingress.httpExtraPaths.prepend }} + {{- tpl ( .Values.ingress.httpExtraPaths.prepend | toYaml ) . | nindent 6 }} {{- end }} - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /console pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /console/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /api pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /api/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /healthcheck pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /v1/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /.well-known pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /.well-known/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /login pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /login/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /logout pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /logout/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /callback pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /callback/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /me pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /config pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /config/* pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /oauth2 pathType: ImplementationSpecific - backend: service: - name: {{ include "flyte-binary.service.http.name" . }} + name: {{ include "flyte-binary.fullname" . }} port: - number: {{ include "flyte-binary.service.http.port" . }} + number: {{ include "flyte-binary.service.httpPort" . }} path: /oauth2/* pathType: ImplementationSpecific - {{- if .Values.ingress.http.extraPaths.append }} - {{- tpl ( .Values.ingress.http.extraPaths.append | toYaml ) . | nindent 6 }} + {{- if .Values.ingress.httpExtraPaths.append }} + {{- tpl ( .Values.ingress.httpExtraPaths.append | toYaml ) . | nindent 6 }} {{- end }} {{- if .Values.ingress.host }} host: {{ tpl .Values.ingress.host . | quote }} diff --git a/charts/flyte-binary/templates/service/grpc.yaml b/charts/flyte-binary/templates/service/grpc.yaml deleted file mode 100644 index 0815556735..0000000000 --- a/charts/flyte-binary/templates/service/grpc.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "flyte-binary.service.grpc.name" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-binary.labels" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.commonLabels }} - {{- tpl ( .Values.service.commonLabels | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.grpc.labels }} - {{- tpl ( .Values.service.grpc.labels | toYaml ) . | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.commonAnnotations }} - {{- tpl ( .Values.service.commonAnnotations | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.grpc.annotations }} - {{- tpl ( .Values.service.grpc.annotations | toYaml ) . | nindent 4 }} - {{- end }} -spec: -{{- with .Values.service.grpc }} - type: {{ .type }} - {{- if or (eq .type "LoadBalancer") (eq .type "NodePort") }} - externalTrafficPolicy: {{ .externalTrafficPolicy | quote }} - {{- end }} - {{- if and (eq .type "LoadBalancer") (not (empty .loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .loadBalancerSourceRanges }} - {{- end }} - {{- if and (eq .type "LoadBalancer") (not (empty .loadBalancerIP)) }} - loadBalancerIP: {{ .loadBalancerIP }} - {{- end }} - {{- if and .clusterIP (eq .type "ClusterIP") }} - clusterIP: {{ .clusterIP }} - {{- end }} - ports: - - name: grpc - port: {{ include "flyte-binary.service.grpc.port" $ }} - targetPort: grpc - {{- if and (or (eq .type "NodePort") (eq .type "LoadBalancer")) (not (empty .nodePort)) }} - nodePort: {{ .nodePort }} - {{- else if eq .type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .extraPorts }} - {{- tpl ( .extraPorts | toYaml ) . | nindent 4 }} - {{- end }} -{{- end }} - selector: {{- include "flyte-binary.selectorLabels" . | nindent 4 }} diff --git a/charts/flyte-binary/templates/service/http.yaml b/charts/flyte-binary/templates/service/http.yaml deleted file mode 100644 index 3f572dea1f..0000000000 --- a/charts/flyte-binary/templates/service/http.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "flyte-binary.service.http.name" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "flyte-binary.labels" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.commonLabels }} - {{- tpl ( .Values.service.commonLabels | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.http.labels }} - {{- tpl ( .Values.service.http.labels | toYaml ) . | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.commonAnnotations }} - {{- tpl ( .Values.service.commonAnnotations | toYaml ) . | nindent 4 }} - {{- end }} - {{- if .Values.service.http.annotations }} - {{- tpl ( .Values.service.http.annotations | toYaml ) . | nindent 4 }} - {{- end }} -spec: -{{- with .Values.service.http }} - type: {{ .type }} - {{- if or (eq .type "LoadBalancer") (eq .type "NodePort") }} - externalTrafficPolicy: {{ .externalTrafficPolicy | quote }} - {{- end }} - {{- if and (eq .type "LoadBalancer") (not (empty .loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .loadBalancerSourceRanges }} - {{- end }} - {{- if and (eq .type "LoadBalancer") (not (empty .loadBalancerIP)) }} - loadBalancerIP: {{ .loadBalancerIP }} - {{- end }} - {{- if and .clusterIP (eq .type "ClusterIP") }} - clusterIP: {{ .clusterIP }} - {{- end }} - ports: - - name: http - port: {{ include "flyte-binary.service.http.port" $ }} - targetPort: http - {{- if and (or (eq .type "NodePort") (eq .type "LoadBalancer")) (not (empty .nodePort)) }} - nodePort: {{ .nodePort }} - {{- else if eq .type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .extraPorts }} - {{- tpl ( .extraPorts | toYaml ) . | nindent 4 }} - {{- end }} -{{- end }} - selector: {{- include "flyte-binary.selectorLabels" . | nindent 4 }} diff --git a/charts/flyte-binary/templates/service/main.yaml b/charts/flyte-binary/templates/service/main.yaml new file mode 100644 index 0000000000..9c93ff38d5 --- /dev/null +++ b/charts/flyte-binary/templates/service/main.yaml @@ -0,0 +1,54 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "flyte-binary.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: {{- include "flyte-binary.labels" . | nindent 4 }} + {{- if .Values.commonLabels }} + {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} + {{- end }} + {{- if .Values.service.labels }} + {{- tpl ( .Values.service.labels | toYaml ) . | nindent 4 }} + {{- end }} + annotations: + {{- if .Values.commonAnnotations }} + {{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }} + {{- end }} + {{- if .Values.service.annotations }} + {{- tpl ( .Values.service.annotations | toYaml ) . | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} + {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }} + loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }} + {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} + ports: + - name: http + port: {{ include "flyte-binary.service.httpPort" . }} + targetPort: http + {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }} + nodePort: {{ .Values.service.nodePorts.http }} + {{- else if eq .Values.service.type "ClusterIP" }} + nodePort: null + {{- end }} + - name: grpc + port: {{ include "flyte-binary.service.grpcPort" . }} + targetPort: grpc + {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.grpc)) }} + nodePort: {{ .Values.service.nodePorts.grpc }} + {{- else if eq .Values.service.type "ClusterIP" }} + nodePort: null + {{- end }} + {{- if .Values.service.extraPorts }} + {{- tpl ( .Values.service.extraPorts | toYaml ) . | nindent 4 }} + {{- end }} + selector: {{- include "flyte-binary.selectorLabels" . | nindent 4 }} diff --git a/charts/flyte-binary/templates/service/webhook.yaml b/charts/flyte-binary/templates/service/webhook.yaml index f6aba9d32f..f5375b1f70 100644 --- a/charts/flyte-binary/templates/service/webhook.yaml +++ b/charts/flyte-binary/templates/service/webhook.yaml @@ -7,15 +7,15 @@ metadata: {{- if .Values.commonLabels }} {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} {{- end }} - {{- if .Values.service.commonLabels }} - {{- tpl ( .Values.service.commonLabels | toYaml ) . | nindent 4 }} + {{- if .Values.service.labels }} + {{- tpl ( .Values.service.labels | toYaml ) . | nindent 4 }} {{- end }} annotations: {{- if .Values.commonAnnotations }} {{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }} {{- end }} - {{- if .Values.service.commonAnnotations }} - {{- tpl ( .Values.service.commonAnnotations | toYaml ) . | nindent 4 }} + {{- if .Values.service.annotations }} + {{- tpl ( .Values.service.annotations | toYaml ) . | nindent 4 }} {{- end }} spec: type: ClusterIP diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index b1850f9ca1..a65bc06694 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -225,85 +225,55 @@ deployment: # service Configure service for Flyte service: - # commonLabels Add common labels to Flyte services - commonLabels: {} - # commonAnnotations Add common annotations to Flyte services - commonAnnotations: {} - http: - # labels Add labels to Flyte service - labels: {} - # annotations Add annotations to service - annotations: {} - # type Kubernetes service type - type: ClusterIP - # port Flyte service port - # If not specified, defaults to corresponding container port - port: "" - # nodePort Node port for Flyte service if service type is `NodePort` or `LoadBalancer` - nodePort: "" - # clusterIP Set static IP if service type is `ClusterIP` - clusterIP: "" - # loadBalancerIP Set static IP if service type is `LoadBalancer` - loadBalancerIP: "" - # externalTrafficPolicy Enable client source IP preservation if service type is `NodePort` or `LoadBalancer` - # See: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - externalTrafficPolicy: Cluster - # loadBalancerSourceRanges Addresses that are allowed when service is `LoadBalancer` - loadBalancerSourceRanges: [] - # extraPorts Additional ports to add to Flyte service - extraPorts: [] - grpc: - # labels Add labels to Flyte service - labels: {} - # annotations Add annotations to service - annotations: {} - # type Kubernetes service type - type: ClusterIP - # port Flyte service port - # If not specified, defaults to corresponding container port - port: "" - # nodePort Node port for Flyte service if service type is `NodePort` or `LoadBalancer` - nodePort: "" - # clusterIP Set static IP if service type is `ClusterIP` - clusterIP: "" - # loadBalancerIP Set static IP if service type is `LoadBalancer` - loadBalancerIP: "" - # externalTrafficPolicy Enable client source IP preservation if service type is `NodePort` or `LoadBalancer` - # See: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - externalTrafficPolicy: Cluster - # loadBalancerSourceRanges Addresses that are allowed when service is `LoadBalancer` - loadBalancerSourceRanges: [] - # extraPorts Additional ports to add to Flyte service - extraPorts: [] + # type Kubernetes service type + type: ClusterIP + # ports Flyte service ports + # If not specified, defaults to corresponding container ports + ports: + http: "" + grpc: "" + # nodePorts Node ports for Flyte service if service type is `NodePort` or `LoadBalancer` + nodePorts: + http: "" + grpc: "" + # clusterIP Set static IP if service type is `ClusterIP` + clusterIP: "" + # labels Add labels to Flyte services + labels: {} + # annotations Add annotations to Flyte services + annotations: {} + # loadBalancerIP Set static IP if service type is `LoadBalancer` + loadBalancerIP: "" + # externalTrafficPolicy Enable client source IP preservation if service type is `NodePort` or `LoadBalancer` + # See: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip + externalTrafficPolicy: Cluster + # loadBalancerSourceRanges Addresses that are allowed when service is `LoadBalancer` + loadBalancerSourceRanges: [] + # extraPorts Additional ports to add to Flyte service + extraPorts: [] # ingress Configure ingress for Flyte ingress: # create Create ingress resources create: false - # commonLabels Add common labels to ingress resources - commonLabels: {} - # commonAnnotations Add common annotations to ingress resources - commonAnnotations: {} + # labels Add labels to ingress resources + labels: {} # host Hostname to bind to ingress resources host: "" - http: - # labels Add labels to ingress resource - labels: {} - # annotations Add annotations to ingress resource - annotations: {} - # extraPaths Add extra paths to ingress rule - extraPaths: - prepend: [] - append: [] - grpc: - # labels Add labels to ingress resource - labels: {} - # annotations Add annotations to ingress resource - annotations: {} - # extraPaths Add extra paths to ingress rule - extraPaths: - prepend: [] - append: [] + # commonAnnotations Add common annotations to all ingress resources + commonAnnotations: {} + # httpAnnotations Add common annotations to http ingress resource + httpAnnotations: {} + # grpcAnnotations Add common annotations to grpc ingress resource + grpcAnnotations: {} + # httpExtraPaths Add extra paths to http ingress rule + httpExtraPaths: + prepend: [] + append: [] + # grpcExtraPaths Add extra paths to grpc ingress rule + grpcExtraPaths: + prepend: [] + append: [] # rbac Configure Kubernetes RBAC for Flyte rbac: diff --git a/charts/flyte-sandbox/Chart.lock b/charts/flyte-sandbox/Chart.lock index 639767e02f..b26ddcbf63 100644 --- a/charts/flyte-sandbox/Chart.lock +++ b/charts/flyte-sandbox/Chart.lock @@ -15,4 +15,4 @@ dependencies: repository: https://charts.bitnami.com/bitnami version: 12.1.9 digest: sha256:e7155e540bbdb98f690eb12e2bd301a19d8b36833336f6991410cb44d8d9bb5e -generated: "2023-03-17T16:50:03.343008-07:00" +generated: "2023-03-07T10:02:34.169731-08:00" diff --git a/charts/flyte-sandbox/templates/proxy/configmap.yaml b/charts/flyte-sandbox/templates/proxy/configmap.yaml index 362597aa9e..83ec877ce0 100644 --- a/charts/flyte-sandbox/templates/proxy/configmap.yaml +++ b/charts/flyte-sandbox/templates/proxy/configmap.yaml @@ -149,7 +149,7 @@ data: address: socket_address: {{- if index .Values "flyte-binary" "enabled" }} - address: {{ include "flyte-binary.service.http.name" .}} + address: {{ include "flyte-sandbox.fullname" .}} {{- else }} address: {{ include "flyte-sandbox.localHeadlessService" . }} {{- end }} @@ -167,7 +167,7 @@ data: address: socket_address: {{- if index .Values "flyte-binary" "enabled" }} - address: {{ include "flyte-binary.service.grpc.name" .}} + address: {{ include "flyte-sandbox.fullname" .}} {{- else }} address: {{ include "flyte-sandbox.localHeadlessService" . }} {{- end }} diff --git a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml index 0ae10ae95f..24c67b8aa1 100644 --- a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml +++ b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml @@ -223,35 +223,11 @@ subjects: name: flyte-flyte-binary namespace: "flyte" --- -# Source: flyte-binary/templates/service/grpc.yaml +# Source: flyte-binary/templates/service/main.yaml apiVersion: v1 kind: Service metadata: - name: flyte-flyte-binary-grpc - 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: -spec: - type: ClusterIP - ports: - - name: grpc - port: 8089 - targetPort: grpc - nodePort: null - selector: - app.kubernetes.io/name: flyte-binary - app.kubernetes.io/instance: flyte ---- -# Source: flyte-binary/templates/service/http.yaml -apiVersion: v1 -kind: Service -metadata: - name: flyte-flyte-binary-http + name: flyte-flyte-binary namespace: "flyte" labels: helm.sh/chart: flyte-binary-v0.1.10 @@ -267,6 +243,10 @@ spec: port: 8088 targetPort: http nodePort: null + - name: grpc + port: 8089 + targetPort: grpc + nodePort: null selector: app.kubernetes.io/name: flyte-binary app.kubernetes.io/instance: flyte diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index 4b60aff3fe..ccbf3432a7 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -679,7 +679,7 @@ data: - endpoint: address: socket_address: - address: flyte-sandbox-http + address: flyte-sandbox port_value: 8088 - name: flyte_grpc connect_timeout: 0.25s @@ -693,7 +693,7 @@ data: - endpoint: address: socket_address: - address: flyte-sandbox-grpc + address: flyte-sandbox port_value: 8089 - name: kubernetes-dashboard connect_timeout: 0.25s @@ -762,7 +762,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: b2VKUWRRdHhxRFZTdjBoZw== + haSharedSecret: R2ZBT0pkdGtuZ0tQeHFuSg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -846,28 +846,6 @@ type: Opaque --- apiVersion: v1 kind: Service -metadata: - labels: - app: docker-registry - chart: docker-registry-2.2.2 - heritage: Helm - release: flyte-sandbox - name: flyte-sandbox-docker-registry - namespace: flyte -spec: - ports: - - name: http-5000 - nodePort: 30000 - port: 5000 - protocol: TCP - targetPort: 5000 - selector: - app: docker-registry - release: flyte-sandbox - type: NodePort ---- -apiVersion: v1 -kind: Service metadata: labels: app.kubernetes.io/instance: flyte-sandbox @@ -875,10 +853,14 @@ metadata: app.kubernetes.io/name: flyte-sandbox app.kubernetes.io/version: 1.16.0 helm.sh/chart: flyte-binary-v0.1.10 - name: flyte-sandbox-grpc + name: flyte-sandbox namespace: flyte spec: ports: + - name: http + nodePort: null + port: 8088 + targetPort: http - name: grpc nodePort: null port: 8089 @@ -892,23 +874,23 @@ apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: flyte-sandbox - app.kubernetes.io/version: 1.16.0 - helm.sh/chart: flyte-binary-v0.1.10 - name: flyte-sandbox-http + app: docker-registry + chart: docker-registry-2.2.2 + heritage: Helm + release: flyte-sandbox + name: flyte-sandbox-docker-registry namespace: flyte spec: ports: - - name: http - nodePort: null - port: 8088 - targetPort: http + - name: http-5000 + nodePort: 30000 + port: 5000 + protocol: TCP + targetPort: 5000 selector: - app.kubernetes.io/instance: flyte-sandbox - app.kubernetes.io/name: flyte-sandbox - type: ClusterIP + app: docker-registry + release: flyte-sandbox + type: NodePort --- apiVersion: v1 kind: Service @@ -1264,7 +1246,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 48e64be9ebcd5c9ff9ad152978104552589aa88ff0bd550670a9ec8455151979 + checksum/secret: b7af65b89a798a2365e092b31a46eaacce978a64328b65fea14f014dee5e5d79 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index edd99470d3..184dc92ca5 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: SDlDRTkxTjJVR1RWR3FoYw== + haSharedSecret: NjRUSFFsdTFmWTRIMjdidA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -875,7 +875,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 75a31dd053629254067f5affbf3616f39d3bdfab6e1ee176bf358ef248dabe2c + checksum/secret: 65be01926fb2783a4fb52f21e30f126a85ff29b0e0fead341247f06035e07118 labels: app: docker-registry release: flyte-sandbox