Skip to content

Commit

Permalink
Helm - Update EKS Ingress
Browse files Browse the repository at this point in the history
Use default Docker images in EKS Helm values.

Based on the following kustomize changes:
- 4e0eed6 Update EKS Ingress and Instructions (flyteorg#825)

Signed-off-by: Sören Brunk <[email protected]>
  • Loading branch information
sbrunk committed Mar 31, 2021
1 parent ba684d1 commit 0ab3cd0
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 132 deletions.
1 change: 1 addition & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dependencies:
- name: kubernetes-dashboard
version: 4.0.2
repository: https://kubernetes.github.io/dashboard/
condition: kubernetes-dashboard.enabled
285 changes: 189 additions & 96 deletions helm/templates/common/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,114 +1,207 @@
{{- if .Values.common.ingress.enabled }}

{{- if .Values.contour.enabled }}
---
apiVersion: extensions/v1beta1
# HTTP Routes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "flyte.name" . }}
namespace: {{ template "flyte.namespace" . }}
annotations:
{{- with .Values.common.ingress.annotations }}
annotations: {{ toYaml . | nindent 4}}
{{ toYaml . | nindent 4}}
{{- end }}
{{- with .Values.common.ingress.httpAnnotations }}
{{ toYaml . | nindent 4}}
{{- end }}
spec:
rules:
- http:
paths:
- backend:
serviceName: flyteconsole
servicePort: 80
path: /console
- backend:
serviceName: flyteconsole
servicePort: 80
path: /__webpack_hmr
- backend:
serviceName: flyteadmin
servicePort: 80
path: /api
- backend:
serviceName: flyteadmin
servicePort: 80
path: /healthcheck
- backend:
serviceName: flyteadmin
servicePort: 80
path: /v1
- backend:
serviceName: flyteadmin
servicePort: 81
path: /flyteidl.service.AdminService
- backend:
serviceName: flyteadmin
servicePort: 87
path: /openapi

{{- else }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "flyte.name" . }}-http1
namespace: {{ template "flyte.namespace" . }}
annotations:
alb.ingress.kubernetes.io/backend-protocol-version: HTTP1
{{- with .Values.common.ingress.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
rules:
- {{- with .Values.common.ingress.host }}
host: {{ . }}
{{- end }}
http:
paths:
- backend:
serviceName: flyteconsole
servicePort: 80
path: /console*
- backend:
serviceName: flyteconsole
servicePort: 80
path: /__webpack_hmr*
- backend:
serviceName: flyteadmin
servicePort: 80
path: /api*
- backend:
serviceName: flyteadmin
servicePort: 80
path: /healthcheck*
- backend:
serviceName: flyteadmin
servicePort: 80
path: /v1*
- backend:
serviceName: flyteadmin
servicePort: 87
path: /openapi*
- http:
paths:
{{- if eq .Values.common.ingress.controllerType "ALB" }}
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: ssl-redirect
port:
name: use-annotation
{{- end }}
# This is useful only for frontend development
{{- if .Values.common.ingress.webpackHMR }}
- path: /__webpack_hmr
pathType: ImplementationSpecific
backend:
service:
name: flyteconsole
port:
number: 80
{{- end }}
# Port 87 in FlyteAdmin maps to the redoc container.
- path: /openapi
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 87
# NOTE: If you change this, you must update the BASE_URL value in flyteconsole.yaml
- path: /console
pathType: ImplementationSpecific
backend:
service:
name: flyteconsole
port:
number: 80
- path: /console/*
pathType: ImplementationSpecific
backend:
service:
name: flyteconsole
port:
number: 80
- path: /api
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /api/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /healthcheck
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /v1/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
# Port 87 in FlyteAdmin maps to the redoc container.
- path: /openapi/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /.well-known/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /login
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /login/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /logout
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /logout/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /callback
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /callback/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /me
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /config
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
- path: /config/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 80
{{- with .Values.common.ingress.host }}
host: {{ . }}
{{- end }}
---
apiVersion: extensions/v1beta1
# GRPC Routes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "flyte.name" . }}-grpc
namespace: {{ template "flyte.namespace" . }}
annotations:
alb.ingress.kubernetes.io/backend-protocol-version: GRPC
{{- with .Values.common.ingress.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.common.ingress.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.common.ingress.grpcAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
rules:
- {{- with .Values.common.ingress.host }}
host: {{ . }}
{{- end }}
http:
paths:
- backend:
serviceName: flyteadmin
servicePort: 81
path: /flyteidl.service.AdminService*

{{- end }}

- http:
paths:
# NOTE: Port 81 in flyteadmin is the GRPC server port for
# FlyteAdmin.
- path: /flyteidl.service.AdminService
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 81
- path: /flyteidl.service.AdminService/*
pathType: ImplementationSpecific
backend:
service:
name: flyteadmin
port:
number: 81
{{- with .Values.common.ingress.host }}
host: {{ . }}
{{- end }}
{{- end }}
Loading

0 comments on commit 0ab3cd0

Please sign in to comment.