revert(ingress): drop per-instance redirect IngressRoute (now handled at cluster Traefik entrypoint)

This commit is contained in:
OdooSky v3
2026-05-05 12:06:15 +02:00
parent 53ffb5a041
commit 5fc75edafb

View File

@@ -41,42 +41,11 @@ spec:
- {{ .Values.instance.domain }} - {{ .Values.instance.domain }}
{{- end }} {{- end }}
--- ---
# HTTP → HTTPS redirect. Browsers default a bare hostname to http://, # HTTP → HTTPS redirect lives at the cluster's Traefik entrypoint
# but the only entrypoint serving Odoo is `websecure` — without this # config (cluster-platform-v3 chart, `traefik.ports.web.redirectTo`)
# route plain-http requests fall through to Traefik's default backend # — every cluster's `web` entrypoint redirects port 80 → 443
# and the user sees Traefik's "404 page not found" even though the # uniformly, before any IngressRoute matching runs. Per-instance
# instance is fully up. The Middleware lives in this same chart so a # redirect is redundant and intentionally NOT defined here.
# legacy cluster without a global redirect-to-https middleware works
# the same as a fresh one.
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: {{ include "instance.fullname" . }}-redirect-https
labels:
{{- include "instance.labels" . | nindent 4 }}
spec:
redirectScheme:
scheme: https
permanent: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: {{ include "instance.fullname" . }}-http
labels:
{{- include "instance.labels" . | nindent 4 }}
spec:
entryPoints:
- web
routes:
- match: Host(`{{ .Values.instance.domain }}`)
kind: Rule
middlewares:
- name: {{ include "instance.fullname" . }}-redirect-https
services:
- name: {{ include "instance.fullname" . }}-odoo
port: 8069
---
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: IngressRoute kind: IngressRoute
metadata: metadata: