From 2360534a38a69183e8302c88a2767436783e8614 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Wed, 5 Aug 2026 22:27:27 +1000 Subject: [PATCH] artifactapi: serve plain HTTP without HTTPS redirect (#336) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 Reviewed-on: https://git.unkin.net/unkin/argocd-apps/pulls/336 Co-authored-by: Ben Vincent Co-committed-by: Ben Vincent --- apps/base/artifactapi/httproute.yaml | 30 ++++++---------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/apps/base/artifactapi/httproute.yaml b/apps/base/artifactapi/httproute.yaml index a81ebe3..775e004 100644 --- a/apps/base/artifactapi/httproute.yaml +++ b/apps/base/artifactapi/httproute.yaml @@ -1,30 +1,6 @@ --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute -metadata: - name: http-redirect - namespace: artifactapi -spec: - hostnames: - - artifactapi.k8s.syd1.au.unkin.net - parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: artifactapi - 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: api-route namespace: artifactapi @@ -32,6 +8,12 @@ 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