Skip to content

Commit 77f40d8

Browse files
committed
feat: prepare for traefik migration
1 parent 878317e commit 77f40d8

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

k8s/projects-frontend/templates/ingress.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
{{- if .Values.traefik }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
labels:
6+
{{- tpl (.Values.commonLabels | toYaml | nindent 4 ) $ }}
7+
name: {{ tpl .Values.fullName . }}
8+
annotations:
9+
kubernetes.io/ingress.class: traefik
10+
cert-manager.io/cluster-issuer: letsencrypt-prod-traefik
11+
spec:
12+
rules:
13+
- host: {{ .Values.hostname }}
14+
http:
15+
paths:
16+
- path: /
17+
pathType: Prefix
18+
backend:
19+
service:
20+
name: {{ tpl .Values.fullName . }}
21+
port:
22+
{{- /* Allow passing a boolean as a string, for applicationset */}}
23+
{{- /* https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/GoTemplate/#limitations*/}}
24+
{{- if eq "true" (.Values.maintenance.enabled | toString) }}
25+
number: {{ .Values.maintenance.portNumber }}
26+
{{- else }}
27+
name: http
28+
{{- end }}
29+
tls:
30+
- hosts:
31+
- {{.Values.hostname }}
32+
# Required as cert is checked before www -> non-www redirect
33+
# https://github.com/kubernetes/ingress-nginx/issues/2043
34+
- {{ printf "www.%s" .Values.hostname }}
35+
secretName: {{.Values.hostname }}-tls
36+
{{- else }}
137
apiVersion: networking.k8s.io/v1
238
kind: Ingress
339
metadata:
@@ -31,3 +67,4 @@ spec:
3167
# https://github.com/kubernetes/ingress-nginx/issues/2043
3268
- {{ printf "www.%s" .Values.hostname }}
3369
secretName: {{.Values.hostname }}-tls
70+
{{- end }}

k8s/projects-frontend/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,5 @@ e2e:
109109
limits:
110110
cpu: 1200m
111111
memory: 1.5Gi
112+
113+
traefik: false

0 commit comments

Comments
 (0)