Skip to content

Commit 279c32e

Browse files
authored
Replace envoy proxy with Traefik ingress in sandbox (#7134)
Signed-off-by: Kevin Su <pingsutw@apache.org>
1 parent a58cfc3 commit 279c32e

14 files changed

Lines changed: 466 additions & 772 deletions

File tree

charts/flyte-sandbox/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,4 @@ A Helm chart for the Flyte local sandbox
107107
| sandbox.console.image.repository | string | `"ghcr.io/flyteorg/flyte-client-v2"` | |
108108
| sandbox.console.image.tag | string | `"latest"` | |
109109
| sandbox.dev | bool | `false` | |
110-
| sandbox.proxy.enabled | bool | `true` | |
111-
| sandbox.proxy.image.pullPolicy | string | `"Never"` | |
112-
| sandbox.proxy.image.repository | string | `"envoyproxy/envoy"` | |
113-
| sandbox.proxy.image.tag | string | `"sandbox"` | |
114110

charts/flyte-sandbox/templates/_helpers.tpl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,6 @@ Name of PersistentVolume and PersistentVolumeClaim for Minio
8989
{{- printf "%s-minio-storage" .Release.Name -}}
9090
{{- end }}
9191

92-
{{/*
93-
Selector labels for Envoy proxy
94-
*/}}
95-
{{- define "flyte-sandbox.proxySelectorLabels" -}}
96-
{{ include "flyte-sandbox.selectorLabels" . }}
97-
app.kubernetes.io/component: proxy
98-
{{- end }}
99-
100-
{{/*
101-
Name of Envoy proxy configmap
102-
*/}}
103-
{{- define "flyte-sandbox.proxyConfigMapName" -}}
104-
{{- printf "%s-proxy-config" .Release.Name -}}
105-
{{- end }}
10692

10793
{{/*
10894
Selector labels for console

charts/flyte-sandbox/templates/proxy/configmap.yaml

Lines changed: 0 additions & 198 deletions
This file was deleted.

charts/flyte-sandbox/templates/proxy/deployment.yaml

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{{- if or ( index .Values "flyte-binary" "enabled" ) .Values.sandbox.dev }}
2+
{{- $backendService := "" }}
3+
{{- if index .Values "flyte-binary" "enabled" }}
4+
{{- $backendService = include "flyte-binary.service.http.name" . }}
5+
{{- else }}
6+
{{- $backendService = include "flyte-sandbox.localHeadlessService" . }}
7+
{{- end }}
8+
apiVersion: networking.k8s.io/v1
9+
kind: Ingress
10+
metadata:
11+
name: {{ include "flyte-sandbox.fullname" . }}-api
12+
namespace: {{ .Release.Namespace | quote }}
13+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
14+
spec:
15+
rules:
16+
- http:
17+
paths:
18+
{{- range $path := list "/healthz" "/readyz" }}
19+
- path: {{ $path }}
20+
pathType: Exact
21+
backend:
22+
service:
23+
name: {{ $backendService }}
24+
port:
25+
number: 8090
26+
{{- end }}
27+
- path: /flyteidl2.
28+
pathType: Prefix
29+
backend:
30+
service:
31+
name: {{ $backendService }}
32+
port:
33+
number: 8090
34+
{{- end }}
35+
---
36+
{{- if .Values.sandbox.console.enabled }}
37+
apiVersion: networking.k8s.io/v1
38+
kind: Ingress
39+
metadata:
40+
name: {{ include "flyte-sandbox.fullname" . }}-console
41+
namespace: {{ .Release.Namespace | quote }}
42+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
43+
spec:
44+
rules:
45+
- http:
46+
paths:
47+
- path: /v2
48+
pathType: Prefix
49+
backend:
50+
service:
51+
name: {{ include "flyte-sandbox.fullname" . }}-console
52+
port:
53+
number: 80
54+
{{- end }}
55+
---
56+
{{- if index .Values "kubernetes-dashboard" "enabled" }}
57+
apiVersion: networking.k8s.io/v1
58+
kind: Ingress
59+
metadata:
60+
name: {{ include "flyte-sandbox.fullname" . }}-kubernetes-dashboard
61+
namespace: {{ .Release.Namespace | quote }}
62+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
63+
annotations:
64+
traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-strip-kubernetes-dashboard@kubernetescrd
65+
spec:
66+
rules:
67+
- http:
68+
paths:
69+
- path: /kubernetes-dashboard
70+
pathType: Prefix
71+
backend:
72+
service:
73+
name: {{ .Release.Name }}-kubernetes-dashboard
74+
port:
75+
number: 80
76+
---
77+
apiVersion: traefik.io/v1alpha1
78+
kind: Middleware
79+
metadata:
80+
name: strip-kubernetes-dashboard
81+
namespace: {{ .Release.Namespace | quote }}
82+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
83+
spec:
84+
stripPrefix:
85+
prefixes:
86+
- /kubernetes-dashboard
87+
{{- end }}
88+
---
89+
{{- if .Values.minio.enabled }}
90+
apiVersion: networking.k8s.io/v1
91+
kind: Ingress
92+
metadata:
93+
name: {{ include "flyte-sandbox.fullname" . }}-minio
94+
namespace: {{ .Release.Namespace | quote }}
95+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
96+
annotations:
97+
traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-strip-minio@kubernetescrd
98+
spec:
99+
rules:
100+
- http:
101+
paths:
102+
- path: /minio
103+
pathType: Prefix
104+
backend:
105+
service:
106+
name: {{ .Release.Name }}-minio
107+
port:
108+
number: 9001
109+
---
110+
apiVersion: traefik.io/v1alpha1
111+
kind: Middleware
112+
metadata:
113+
name: strip-minio
114+
namespace: {{ .Release.Namespace | quote }}
115+
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
116+
spec:
117+
stripPrefix:
118+
prefixes:
119+
- /minio
120+
{{- end }}

0 commit comments

Comments
 (0)