From 646f4e1af17bb4f1986d0f93c35ffcbff1ae2deb Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 23 May 2026 22:13:24 +1000 Subject: [PATCH] =?UTF-8?q?feat(consul):=20add=20HTTP=E2=86=92HTTPS=20redi?= =?UTF-8?q?rect=20on=20port=2080?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/consul/gateway.yaml | 7 +++++++ apps/base/consul/httproute.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/apps/base/consul/gateway.yaml b/apps/base/consul/gateway.yaml index 62d37e4..30d7e9f 100644 --- a/apps/base/consul/gateway.yaml +++ b/apps/base/consul/gateway.yaml @@ -18,6 +18,13 @@ metadata: spec: gatewayClassName: traefik-internal listeners: + - name: http + port: 80 + protocol: HTTP + hostname: consul.k8s.syd1.au.unkin.net + allowedRoutes: + namespaces: + from: Same - name: https port: 443 protocol: HTTPS diff --git a/apps/base/consul/httproute.yaml b/apps/base/consul/httproute.yaml index b3179f9..53297f6 100644 --- a/apps/base/consul/httproute.yaml +++ b/apps/base/consul/httproute.yaml @@ -1,6 +1,31 @@ --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute +metadata: + name: consul-http-redirect + namespace: consul + labels: + app.kubernetes.io/name: consul + app.kubernetes.io/instance: consul +spec: + hostnames: + - consul.k8s.syd1.au.unkin.net + parentRefs: + - name: consul + sectionName: http + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 + matches: + - path: + type: PathPrefix + value: / +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute metadata: name: consul namespace: consul