feat(helm): add TLSRoute passthrough support for gateway api (#6169)

Add an optional TLS passthrough listener to the Gateway API support. When gatewayApi.listeners.tls.enabled is true, the Gateway gets a TLS listener with tls.mode: Passthrough and a TLSRoute is rendered to the RustFS service so TLS terminates at the backend (end-to-end encryption).

Refs rustfs/rustfs#3862.
This commit is contained in:
hector
2026-08-18 01:21:15 +08:00
committed by GitHub
parent 59b7d13095
commit beb6e1383e
4 changed files with 47 additions and 0 deletions
+6
View File
@@ -273,6 +273,10 @@ uer. `ClusterIssuer` or `Issuer`. |
| gatewayApi.listeners.http.port| int | `8000` | Gateway API http listener port. |
| gatewayApi.listeners.https.name | string | `websecure` | Gateway API https listener name. |
| gatewayApi.listeners.https.port| int | `8443` | Gateway API https listener port. |
| gatewayApi.listeners.tls.enabled | bool | `false` | Enable a TLS passthrough listener and generate a TLSRoute. |
| gatewayApi.listeners.tls.name | string | `tls` | Gateway API TLS passthrough listener name. |
| gatewayApi.listeners.tls.port | int | `443` | Gateway API TLS passthrough listener port. |
| gatewayApi.listeners.tls.backendPort | int | `null` | Backend service port that terminates TLS; defaults to the console port. |
| gatewayApi.hostname | string | Hostname to access RustFS via gateway api. |
| gatewayApi.secretName | string | Secret tls to via RustFS using HTTPS. |
| gatewayApi.existingGateway.name | string | `""` | The existing gateway name, instead of creating a new one. |
@@ -447,6 +451,8 @@ rustfs-route ["example.rustfs.com"] 172m
Then, via RustFS instance via `https://example.rustfs.com` or `http://example.rustfs.com`.
For end-to-end encryption, set `gatewayApi.listeners.tls.enabled` to `true`. The chart then adds a `TLS` listener with `tls.mode: Passthrough` to the `Gateway` and generates a `TLSRoute` that forwards the encrypted stream to the RustFS service, where TLS is terminated on the backend side. Note that backend TLS termination must be configured on RustFS itself (for example `RUSTFS_TLS_PATH` pointing to server certificates), and the installed Gateway API CRDs must include `TLSRoute`.
# Uninstall
Uninstalling the rustfs installation with command,
@@ -26,5 +26,15 @@ spec:
- name: {{ include "rustfs.fullname" $ }}-tls
kind: Secret
{{- end }}
{{- if .tls.enabled }}
- name: {{ .tls.name }}
port: {{ .tls.port }}
protocol: TLS
tls:
mode: Passthrough
allowedRoutes:
namespaces:
from: Same
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,25 @@
{{- if and .Values.gatewayApi.enabled .Values.gatewayApi.listeners.tls.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: TLSRoute
metadata:
name: {{ include "rustfs.fullname" . }}-tlsroute
namespace: {{ .Release.Namespace }}
spec:
parentRefs:
{{- if .Values.gatewayApi.existingGateway.name }}
- name: {{ .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.namespace }}
namespace: {{ .Values.gatewayApi.existingGateway.namespace }}
{{- end }}
sectionName: {{ .Values.gatewayApi.listeners.tls.name }}
{{- else }}
- name: {{ include "rustfs.fullname" $ }}-gateway
sectionName: {{ .Values.gatewayApi.listeners.tls.name }}
{{- end }}
hostnames:
- {{ .Values.gatewayApi.hostname }}
rules:
- backendRefs:
- name: {{ include "rustfs.fullname" . }}-svc
port: {{ .Values.gatewayApi.listeners.tls.backendPort | default .Values.service.console.port }}
{{- end }}
+6
View File
@@ -369,6 +369,12 @@ gatewayApi:
https:
name: websecure
port: 8443
tls: # Optional TLS passthrough listener; renders a TLSRoute so TLS terminates at the RustFS backend.
enabled: false
name: tls
port: 443
# Service port that terminates TLS on the backend; defaults to the console port.
backendPort: null
hostname: example.rustfs.com
httpToHttpsRedirect: true
existingGateway: