mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
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:
@@ -273,6 +273,10 @@ uer. `ClusterIssuer` or `Issuer`. |
|
|||||||
| gatewayApi.listeners.http.port| int | `8000` | Gateway API http listener port. |
|
| 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.name | string | `websecure` | Gateway API https listener name. |
|
||||||
| gatewayApi.listeners.https.port| int | `8443` | Gateway API https listener port. |
|
| 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.hostname | string | Hostname to access RustFS via gateway api. |
|
||||||
| gatewayApi.secretName | string | Secret tls to via RustFS using HTTPS. |
|
| gatewayApi.secretName | string | Secret tls to via RustFS using HTTPS. |
|
||||||
| gatewayApi.existingGateway.name | string | `""` | The existing gateway name, instead of creating a new one. |
|
| 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`.
|
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
|
# Uninstall
|
||||||
|
|
||||||
Uninstalling the rustfs installation with command,
|
Uninstalling the rustfs installation with command,
|
||||||
|
|||||||
@@ -26,5 +26,15 @@ spec:
|
|||||||
- name: {{ include "rustfs.fullname" $ }}-tls
|
- name: {{ include "rustfs.fullname" $ }}-tls
|
||||||
kind: Secret
|
kind: Secret
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .tls.enabled }}
|
||||||
|
- name: {{ .tls.name }}
|
||||||
|
port: {{ .tls.port }}
|
||||||
|
protocol: TLS
|
||||||
|
tls:
|
||||||
|
mode: Passthrough
|
||||||
|
allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- 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 }}
|
||||||
@@ -369,6 +369,12 @@ gatewayApi:
|
|||||||
https:
|
https:
|
||||||
name: websecure
|
name: websecure
|
||||||
port: 8443
|
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
|
hostname: example.rustfs.com
|
||||||
httpToHttpsRedirect: true
|
httpToHttpsRedirect: true
|
||||||
existingGateway:
|
existingGateway:
|
||||||
|
|||||||
Reference in New Issue
Block a user