-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtraefik-ingressroute-cached.yaml
More file actions
29 lines (29 loc) · 1.03 KB
/
traefik-ingressroute-cached.yaml
File metadata and controls
29 lines (29 loc) · 1.03 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
{{/*
Traefik IngressRoute - Cached static assets with regex path matching
Replaces: k8s-manifests/traefik-ingressroute-cached.yaml
Uses IngressRoute CRD because regex path patterns cannot be expressed
with standard Kubernetes Ingress pathType (Prefix/Exact).
Only rendered when traefikIngress.enabled is true.
*/}}
{{- if .Values.traefikIngress.enabled }}
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: {{ include "modernization-api.fullname" . }}-traefik-cached
labels:
{{- include "modernization-api.labels" . | nindent 4 }}
spec:
entryPoints:
- websecure
routes:
- match: "Host(`{{ .Values.ingressHost }}`) && PathRegexp(`^/(?!auth|ecr-viewer|orchestration).+\\.(jpg|svg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|woff2)$`)"
kind: Rule
services:
- name: nbs-gateway-svc
port: 8000
middlewares:
- name: nbs-cached-headers
namespace: {{ .Release.Namespace }}
tls:
secretName: {{ .Values.ingressHost }}
{{- end }}