2360534a38
## Why Early-boot clients — anaconda/kickstart and yum in %post, PXE environments — need direct HTTP access to the artifactapi rpm repos. The current setup returns a 301 redirect from HTTP to HTTPS, which those minimal clients cannot follow (or downgrade insecurely), breaking rpm installs. ## Changes - Attach the `api-route` HTTPRoute to the Gateway's `http` (port 80) listener alongside `https`, so `http://artifactapi.k8s.syd1.au.unkin.net/...` serves app content directly (200/40x from the app, no Location header). - Remove the `http-redirect` HTTPRoute (RequestRedirect 301 `http`->`https`), which was the sole redirect mechanism — the traefik `web` entrypoint has no global `redirections`, so this is scoped strictly to artifactapi and does not affect other apps. - Leave HTTPS unchanged. https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT --------- Co-authored-by: Ben Vincent <neotheo@gmail.com> Reviewed-on: #336 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
42 lines
990 B
YAML
42 lines
990 B
YAML
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: api-route
|
|
namespace: artifactapi
|
|
spec:
|
|
hostnames:
|
|
- artifactapi.k8s.syd1.au.unkin.net
|
|
parentRefs:
|
|
# Early-boot clients (anaconda/kickstart, yum in %post, PXE) need plain HTTP
|
|
# for the rpm repos; serve the app directly on port 80 instead of redirecting.
|
|
- group: gateway.networking.k8s.io
|
|
kind: Gateway
|
|
name: artifactapi
|
|
sectionName: http
|
|
- group: gateway.networking.k8s.io
|
|
kind: Gateway
|
|
name: artifactapi
|
|
sectionName: https
|
|
rules:
|
|
- backendRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: ui
|
|
port: 80
|
|
weight: 1
|
|
matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /ui
|
|
- backendRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: artifactapi
|
|
port: 80
|
|
weight: 1
|
|
matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|