From a206a0779efa49a78990f1ceba624fedc1fbe04b Mon Sep 17 00:00:00 2001 From: sass1997 <30902011+sass1997@users.noreply.github.com> Date: Tue, 11 Aug 2026 15:30:38 +0200 Subject: [PATCH] fix(gateway): api flag https redirect (#5960) * fix: add helm toggle to disable the http to https redirect * docs: add documentation about new parameter --- helm/README.md | 1 + helm/rustfs/templates/gateway-api/httproute.yml | 3 ++- helm/rustfs/values.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/README.md b/helm/README.md index 148d38cda..8bdd8b531 100644 --- a/helm/README.md +++ b/helm/README.md @@ -268,6 +268,7 @@ uer. `ClusterIssuer` or `Issuer`. | | topologySpreadConstraints.constraints | list | `[]` | Raw `spec.template.spec.topologySpreadConstraints` entries applied to the distributed StatefulSet when enabled. | | gatewayApi.enabled | bool | `false` | To enable/disable gateway api support. | | gatewayApi.gatewayClass | string | `traefik` | Gateway class implementation. | +| gatewayApi.httpToHttpsRedirect | bool | `true` | To enable/disable the redirect httproute. | | gatewayApi.listeners.http.name | string | `web` | Gateway API http listener name. | | gatewayApi.listeners.http.port| int | `8000` | Gateway API http listener port. | | gatewayApi.listeners.https.name | string | `websecure` | Gateway API https listener name. | diff --git a/helm/rustfs/templates/gateway-api/httproute.yml b/helm/rustfs/templates/gateway-api/httproute.yml index 36864ea87..77dc71be0 100644 --- a/helm/rustfs/templates/gateway-api/httproute.yml +++ b/helm/rustfs/templates/gateway-api/httproute.yml @@ -37,7 +37,7 @@ spec: - name: {{ include "rustfs.fullname" $ }}-svc port: {{ .Values.service.console.port }} {{- end }} - +{{- if .Values.gatewayApi.httpToHttpsRedirect }} --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -62,4 +62,5 @@ spec: requestRedirect: scheme: https statusCode: 301 + {{- end }} {{- end }} diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index 7a254b869..b1cf31936 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -370,6 +370,7 @@ gatewayApi: name: websecure port: 8443 hostname: example.rustfs.com + httpToHttpsRedirect: true existingGateway: name: "" namespace: ""