From dc1d994f8407b57666063f754c861acbda3fdf31 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Tue, 17 Mar 2026 18:48:06 -0500 Subject: [PATCH] feat(helm): add Ingress template with API, docs, metrics, and frontend routes Routes /api, /docs, /metrics to API service and / to frontend, with optional TLS and annotation support. Co-Authored-By: Claude Opus 4.6 (1M context) --- infrastructure/helm/templates/ingress.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 infrastructure/helm/templates/ingress.yaml diff --git a/infrastructure/helm/templates/ingress.yaml b/infrastructure/helm/templates/ingress.yaml new file mode 100644 index 0000000..000bd31 --- /dev/null +++ b/infrastructure/helm/templates/ingress.yaml @@ -0,0 +1,54 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "tod.fullname" . }} + labels: + {{- include "tod.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls.enabled }} + tls: + - hosts: + - {{ .Values.ingress.host }} + {{- if .Values.ingress.tls.secretName }} + secretName: {{ .Values.ingress.tls.secretName }} + {{- end }} + {{- end }} + rules: + - host: {{ .Values.ingress.host }} + http: + paths: + - path: /api + pathType: Prefix + backend: + service: + name: {{ include "tod.fullname" . }}-api + port: + number: 8000 + - path: /docs + pathType: Prefix + backend: + service: + name: {{ include "tod.fullname" . }}-api + port: + number: 8000 + - path: /metrics + pathType: Exact + backend: + service: + name: {{ include "tod.fullname" . }}-api + port: + number: 8000 + - path: / + pathType: Prefix + backend: + service: + name: {{ include "tod.fullname" . }}-frontend + port: + number: 80 +{{- end }}