-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ryan Lo <[email protected]>
- Loading branch information
Showing
4 changed files
with
267 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
charts/flyte-core/templates/common/ingress-separateGrpc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{{/* Certain ingress controllers like nginx cannot serve HTTP 1 and GRPC with a single ingress because GRPC can only */}} | ||
{{/* enabled on the ingress object, not on backend services (GRPC annotation is set on the ingress, not on the services). */}} | ||
|
||
{{- if and .Values.common.ingress.enabled .Values.common.ingress.separateGrpcIngress }} | ||
{{- $annotations := .Values.common.ingress.annotations | deepCopy -}} | ||
{{- $_ := merge $annotations .Values.common.ingress.separateGrpcIngressAnnotations -}} | ||
|
||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else }} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ template "flyte.name" . }}-grpc | ||
namespace: {{ template "flyte.namespace" . }} | ||
{{- with $annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4}} | ||
{{- end }} | ||
spec: | ||
ingressClassName: {{ .Values.common.ingress.ingressClassName | quote }} | ||
rules: | ||
- host: {{ tpl (toYaml .Values.common.ingress.host) $ }} | ||
http: | ||
paths: | ||
{{- include "ingress.grpcRoutes" . | nindent 10 -}} | ||
{{- if .Values.common.ingress.albSSLRedirect }} | ||
# - backend: | ||
# serviceName: ssl-redirect | ||
# servicePort: use-annotation | ||
# path: /* | ||
# pathType: ImplementationSpecific | ||
{{- end }} | ||
{{- if .Values.common.ingress.tls.enabled }} | ||
tls: | ||
- secretName: {{ .Values.common.ingress.tls.secretName | default (printf "%s-flyte-tls" .Release.Name) }} | ||
hosts: | ||
- {{ tpl (toYaml .Values.common.ingress.host) $ }} | ||
{{ end }} | ||
{{- end }} |
Oops, something went wrong.