/health returned nginx 404 through the ingress while the service answered 200 in-cluster. The ingress rule was correct on paper — /health Exact -> reuse-surface:8000 alongside / Prefix -> reuse-surface-landing:8080 — but Traefik derives router priority from the length of the generated rule string, and Path(`/health`) and PathPrefix(`/`) are both 15 characters. The tie broke toward the landing page. PathPrefix(`/v1`) is longer, which is why /v1 worked and the fault looked like a /health-only bug. traefik.ingress.kubernetes.io/router.priority applies per Ingress, not per path, so the catch-all moves into its own Ingress with priority 1. Every API route now outranks it regardless of rule length. This is not cosmetic: make reuse-smoke curls /health and false-negatives on an otherwise healthy release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "reuse.fullname" . }}
|
|
labels: {{- include "reuse.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{- toYaml .Values.ingress.annotations | nindent 4 }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.host }}
|
|
secretName: {{ include "reuse.fullname" . }}-tls
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host }}
|
|
http:
|
|
paths:
|
|
{{- if .Values.landing.enabled }}
|
|
{{- range .Values.ingress.apiPaths }}
|
|
- path: {{ .path }}
|
|
pathType: {{ .pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ include "reuse.fullname" $ }}
|
|
port:
|
|
number: {{ $.Values.service.port }}
|
|
{{- end }}
|
|
{{- /* the landing catch-all is a separate Ingress; see landing-ingress.yaml */}}
|
|
{{- else }}
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "reuse.fullname" . }}
|
|
port:
|
|
number: {{ .Values.service.port }}
|
|
{{- end }}
|
|
{{- end }}
|