SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
helm: Support multiple hosts for S3 ingress (#7931)
Sheya Bernstein6f28cb7f8772
diff --git a/k8s/charts/seaweedfs/templates/s3/s3-ingress.yaml b/k8s/charts/seaweedfs/templates/s3/s3-ingress.yamlindex 899773ae3d..e884f4fcee 100644--- a/k8s/charts/seaweedfs/templates/s3/s3-ingress.yaml+++ b/k8s/charts/seaweedfs/templates/s3/s3-ingress.yaml@@ -4,6 +4,13 @@{{- /* Determine service name based on deployment mode */}}{{- $serviceName := ternary (printf "%s-all-in-one" (include "seaweedfs.name" .)) (printf "%s-s3" (include "seaweedfs.name" .)) .Values.allInOne.enabled }}{{- $s3Port := .Values.allInOne.s3.port | default .Values.s3.port }}+{{- /* Build hosts list - support both legacy .host (string) and new .hosts (array) for backwards compatibility */}}+{{- $hosts := list }}+{{- if kindIs "slice" .Values.s3.ingress.host }}+ {{- $hosts = .Values.s3.ingress.host }}+{{- else if .Values.s3.ingress.host }}+ {{- $hosts = list .Values.s3.ingress.host }}+{{- end }}{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}apiVersion: networking.k8s.io/v1{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}@@ -30,6 +37,25 @@ spec:tls:{{ .Values.s3.ingress.tls | default list | toYaml | nindent 6}}rules:+{{- if $hosts }}+{{- range $hosts }}+ - host: {{ . | quote }}+ http:+ paths:+ - path: {{ $.Values.s3.ingress.path | quote }}+ pathType: {{ $.Values.s3.ingress.pathType | quote }}+ backend:+{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}+ service:+ name: {{ $serviceName }}+ port:+ number: {{ $s3Port }}+{{- else }}+ serviceName: {{ $serviceName }}+ servicePort: {{ $s3Port }}+{{- end }}+{{- end }}+{{- else }}- http:paths:- path: {{ .Values.s3.ingress.path | quote }}@@ -44,7 +70,5 @@ spec:serviceName: {{ $serviceName }}servicePort: {{ $s3Port }}{{- end }}-{{- if .Values.s3.ingress.host }}- host: {{ .Values.s3.ingress.host | quote }}{{- end }}{{- end }}diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yamlindex 947369c88d..a2419805bc 100644--- a/k8s/charts/seaweedfs/values.yaml+++ b/k8s/charts/seaweedfs/values.yaml@@ -1012,7 +1012,7 @@ s3:ingress:enabled: falseclassName: ""- # host: false for "*" hostname+ # host: false for "*" hostname, or an array for multiple hostnameshost: "seaweedfs.cluster.local"path: "/"pathType: Prefix