feat: add support for existing gateways in helm chart (#1469)

Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
Jasper Weyne
2026-01-14 10:54:37 +01:00
committed by GitHub
parent 68c5c0b834
commit 15e6d4dbd0
5 changed files with 14 additions and 2 deletions

View File

@@ -114,6 +114,8 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
| gatewayApi.gatewayClass | string | `traefik` | Gateway class implementation. |
| 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. |
| gatewayApi.existingGateway.namespace | string | `""` | The namespace of the existing gateway, if not the local namespace. |
---

View File

@@ -1,4 +1,4 @@
{{- if .Values.gatewayApi.enabled }}
{{- if and .Values.gatewayApi.enabled (empty .Values.gatewayApi.existingGateway.name) }}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:

View File

@@ -5,7 +5,14 @@ metadata:
name: {{ include "rustfs.fullname" . }}-route
spec:
parentRefs:
{{- if .Values.gatewayApi.existingGateway.name }}
- name: {{ .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.namespace }}
namespace: {{ .Values.gatewayApi.existingGateway.namespace }}
{{- end }}
{{- else }}
- name: {{ include "rustfs.fullname" . }}-gateway
{{- end }}
hostnames:
- {{ .Values.gatewayApi.hostname }}
rules:

View File

@@ -1,4 +1,4 @@
{{- if and (or .Values.gatewayApi.enabled .Values.ingress.tls.enabled) (not .Values.ingress.tls.certManager.enabled) }}
{{- if and (or .Values.gatewayApi.enabled .Values.ingress.tls.enabled) (not (or .Values.ingress.tls.certManager.enabled .Values.gatewayApi.existingGateway.name)) }}
apiVersion: v1
kind: Secret
metadata:

View File

@@ -140,6 +140,9 @@ gatewayApi:
gatewayClass: traefik
hostname: example.rustfs.com
secretName: secret-tls
existingGateway:
name: ""
namespace: ""
resources:
# We usually recommend not to specify default resources and to leave this as a conscious