From a598a0ba6b38be5c81a9477d6d88e19bf088086c Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Wed, 18 Nov 2026 13:20:24 +0100 Subject: [PATCH] k8s: IngressRoute modelled on the gitea one Same ingress class (traefik-internal), entry point and shape; the extra Middleware and redirect routes are gone. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw --- k8s/base/ingressroute.yaml | 66 ++++++-------------------------------- 1 file changed, 10 insertions(+), 56 deletions(-) diff --git a/k8s/base/ingressroute.yaml b/k8s/base/ingressroute.yaml index 31ff9ff..ecf7950 100644 --- a/k8s/base/ingressroute.yaml +++ b/k8s/base/ingressroute.yaml @@ -1,75 +1,29 @@ -# Optional: the web UI on a public name, through Traefik, so people can search -# without running their own node. Not part of the kustomization until you -# enable it there. +# Optional: the web UI on a public name, through Traefik, modelled on the gitea +# IngressRoute (same ingress class, entry point and shape). Not part of the +# kustomization until you enable it there. # # There is no separate web image: the UI is built into the allmende binary, so # the one image (see kustomization.yaml) serves it on port 8080. # # The same port serves the owner API. It is protected by the admin token (which -# stays on the volume, /data/admin.token), but TLS is a must, and you may want -# to limit who can reach /api/v1/ beyond reading (see the Middleware below). +# stays on the volume, /data/admin.token), and TLS is done where your gitea's is. # # The libp2p port (4001) does not go through Traefik: it is not HTTP, and # service-p2p.yaml already exposes it. -# -# traefik.io/v1alpha1 is the group of Traefik v3 (and v2.10+); for older v2 -# installs use traefik.containo.us/v1alpha1. apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: allmende + annotations: + kubernetes.io/ingress.class: traefik-internal spec: entryPoints: - websecure routes: - kind: Rule - match: Host(`allmende.example.org`) + match: Host(`allmende.stinnesbeck.com`) services: - - name: allmende-http + - kind: Service + name: allmende-http + namespace: allmende port: http - # middlewares: - # - name: allmende-security-headers - tls: - # Certificates through a resolver configured in Traefik (ACME)... - certResolver: letsencrypt - # ...or from a Secret, e.g. issued by cert-manager: - # secretName: allmende-tls ---- -# Optional, referenced above once you uncomment it: security headers for the UI. -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: allmende-security-headers -spec: - headers: - stsSeconds: 31536000 - stsIncludeSubdomains: true - contentTypeNosniff: true - frameDeny: true - referrerPolicy: no-referrer ---- -# Optional: serve plain HTTP only as a redirect to HTTPS. -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: allmende-http-redirect -spec: - entryPoints: - - web - routes: - - kind: Rule - match: Host(`allmende.example.org`) - middlewares: - - name: allmende-redirect-https - services: - - name: noop@internal - kind: TraefikService ---- -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: allmende-redirect-https -spec: - redirectScheme: - scheme: https - permanent: true