-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtraefik-ingress.yaml
More file actions
71 lines (71 loc) · 2.15 KB
/
traefik-ingress.yaml
File metadata and controls
71 lines (71 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{{/*
Traefik Ingress - Main application routes (KeyCloak + NBS Gateway)
Replaces: k8s-manifests/traefik-ingress-main.yaml
Only rendered when traefikIngress.enabled is true.
Only one ingress type should be enabled: nginx (ingress), istio (istioGatewayIngress), or traefik (traefikIngress).
*/}}
{{- if .Values.traefikIngress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "modernization-api.fullname" . }}-traefik-ingress
labels:
{{- include "modernization-api.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-production"
traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-nbs-custom-headers@kubernetescrd,{{ .Release.Namespace }}-body-size-limit@kubernetescrd
spec:
ingressClassName: traefik
tls:
- secretName: {{ .Values.ingressHost }}
hosts:
- {{ .Values.ingressHost }}
rules:
- host: {{ .Values.ingressHost }}
http:
paths:
# KeyCloak auth routes
- path: "/auth/realms/nbs-users/"
pathType: Prefix
backend:
service:
name: keycloak
port:
name: http
- path: "/auth/robots.txt"
pathType: Exact
backend:
service:
name: keycloak
port:
name: http
- path: "/auth/js/"
pathType: Prefix
backend:
service:
name: keycloak
port:
name: http
- path: "/auth/resources/"
pathType: Prefix
backend:
service:
name: keycloak
port:
name: http
# NBS Gateway routes
- path: /favicon.ico
pathType: Prefix
backend:
service:
name: nbs-gateway-svc
port:
number: 8000
- path: "/"
pathType: Prefix
backend:
service:
name: nbs-gateway-svc
port:
number: 8000
{{- end }}