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: ""