This commit is contained in:
2026-02-18 19:44:54 +01:00
parent d2328fc8d6
commit 6b3d0c342e
3 changed files with 12 additions and 10 deletions

View File

@@ -2,6 +2,6 @@ apiVersion: v2
name: timetracker
description: A Helm chart for the TimeTracker application
type: application
version: 1.0.3
version: 1.0.4
appVersion: "1.0.0"
dependencies: []

View File

@@ -19,16 +19,17 @@ spec:
http:
paths:
# Backend API routes first (more specific)
- path: /api
pathType: Prefix
# $2 capture group strips the /api prefix via rewrite-target annotation
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ include "timetracker.fullname" $ }}-backend
port:
number: {{ $.Values.backend.service.port }}
# Frontend (catch-all)
- path: /
pathType: Prefix
- path: /()(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ include "timetracker.fullname" $ }}-frontend

View File

@@ -61,7 +61,7 @@ frontend:
service:
type: ClusterIP
port: 80
port: 8080
resources:
limits:
@@ -77,16 +77,17 @@ ingress:
className: nginx
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
hosts:
- host: timetracker.local
paths:
- path: /
pathType: Prefix
pathType: ImplementationSpecific
service: frontend
port: 80
- path: /api
pathType: Prefix
port: 8080
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
service: backend
port: 3001