mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 02:12:55 +02:00
1eb070ad66
Split lingo-ingress into two separate ingresses: - lingo-api-ingress: keeps rewrite-target for API path stripping - lingo-frontend-ingress: no rewrite, allows static files to load The previous single ingress applied rewrite-target to all paths, causing frontend requests like /css/bootstrap.css to be rewritten to / and return index.html instead of the actual files.
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lingo-api-ingress
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
|
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
|
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: lingo.hensen.io
|
|
http:
|
|
paths:
|
|
- path: /api(/|$)(.*)
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: lingo-api
|
|
port:
|
|
number: 8000
|
|
tls:
|
|
- secretName: letsencrypt-prod
|
|
hosts:
|
|
- lingo.hensen.io
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lingo-frontend-ingress
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
|
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: lingo.hensen.io
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: lingo-frontend
|
|
port:
|
|
number: 8001
|
|
tls:
|
|
- secretName: letsencrypt-prod
|
|
hosts:
|
|
- lingo.hensen.io
|