fix: gateway api listener name hardcode issue (#1834)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
majinghe
2026-02-15 16:01:40 +08:00
committed by GitHub
parent 2d4d240508
commit da15d622a0
4 changed files with 24 additions and 18 deletions
+4
View File
@@ -119,6 +119,10 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
| tolerations | list | `[]` | |
| gatewayApi.enabled | bool | `false` | To enable/disable gateway api support. |
| gatewayApi.gatewayClass | string | `traefik` | Gateway class implementation. |
| 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. |
| gatewayApi.listeners.https.port| int | `8443` | Gateway API https listener 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. |
@@ -8,17 +8,17 @@ spec:
gatewayClassName: {{ .Values.gatewayApi.gatewayClass }}
{{- with .Values.gatewayApi.listeners }}
listeners:
{{- if .web }}
- name: http
port: {{ .web.port }}
{{- if .http }}
- name: {{ .http.name }}
port: {{ .http.port }}
protocol: HTTP
allowedRoutes:
namespaces:
from: Same
{{- end }}
{{- if .websecure }}
- name: https
port: {{ .websecure.port }}
{{- if .https }}
- name: {{ .https.name }}
port: {{ .https.port }}
protocol: HTTPS
tls:
mode: Terminate
+10 -10
View File
@@ -10,16 +10,16 @@ metadata:
{{- end }}
spec:
parentRefs:
{{- if .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.name }}
- name: {{ .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.namespace }}
namespace: {{ .Values.gatewayApi.existingGateway.namespace }}
{{- end }}
sectionName: https
{{- else }}
sectionName: {{ .Values.gatewayApi.listeners.https.name | default "websecure"}}
{{- else }}
- name: {{ include "rustfs.fullname" $ }}-gateway
sectionName: https
{{- end }}
sectionName: {{ .Values.gatewayApi.listeners.https.name | default "websecure"}}
{{- end }}
hostnames:
- {{ .Values.gatewayApi.hostname }}
rules:
@@ -46,16 +46,16 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
parentRefs:
{{- if .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.name }}
- name: {{ .Values.gatewayApi.existingGateway.name }}
{{- if .Values.gatewayApi.existingGateway.namespace }}
namespace: {{ .Values.gatewayApi.existingGateway.namespace }}
{{- end }}
sectionName: http
{{- else }}
sectionName: {{ .Values.gatewayApi.listeners.http.name | default "web" }}
{{- else }}
- name: {{ include "rustfs.fullname" $ }}-gateway
sectionName: http
{{- end }}
sectionName: {{ .Values.gatewayApi.listeners.http.name | default "web" }}
{{- end }}
rules:
- filters:
- type: RequestRedirect
+4 -2
View File
@@ -154,9 +154,11 @@ gatewayApi:
enabled: false
gatewayClass: traefik
listeners: # Specify which listeners to create on the Gateway. Only support for traefik gatewayClass at the moment.
web:
http:
name: web
port: 8000
websecure:
https:
name: websecure
port: 8443
hostname: example.rustfs.com
existingGateway: