From 6b15e727f5a4325bc6ae560f3766a322a82026c9 Mon Sep 17 00:00:00 2001 From: majinghe <42570491+majinghe@users.noreply.github.com> Date: Thu, 29 Jan 2026 17:55:24 +0800 Subject: [PATCH] feat: add virtual host mode support for kubernetes installation (#1655) --- Dockerfile.source | 2 +- helm/rustfs/Chart.yaml | 4 ++-- helm/rustfs/templates/_helpers.tpl | 15 +++++++++++++++ helm/rustfs/templates/configmap.yaml | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile.source b/Dockerfile.source index 32f7e6559..3dc2304ba 100644 --- a/Dockerfile.source +++ b/Dockerfile.source @@ -85,7 +85,7 @@ COPY . . # Generate static files -RUN ./rustfs/scripts/static.sh +RUN ./scripts/static.sh # Cargo build configuration for lean release artifacts ENV CARGO_NET_GIT_FETCH_WITH_CLI=true \ diff --git a/helm/rustfs/Chart.yaml b/helm/rustfs/Chart.yaml index fbd421d25..a4e833333 100644 --- a/helm/rustfs/Chart.yaml +++ b/helm/rustfs/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rustfs description: RustFS helm chart to deploy RustFS on kubernetes cluster. type: application -version: 0.0.77 -appVersion: "1.0.0-alpha.77" +version: 0.0.82 +appVersion: "1.0.0-alpha.82" home: https://rustfs.com icon: https://media.sys.truenas.net/apps/rustfs/icons/icon.svg maintainers: diff --git a/helm/rustfs/templates/_helpers.tpl b/helm/rustfs/templates/_helpers.tpl index c9ab646b5..34e99413c 100644 --- a/helm/rustfs/templates/_helpers.tpl +++ b/helm/rustfs/templates/_helpers.tpl @@ -111,3 +111,18 @@ Render RUSTFS_VOLUMES {{- end }} {{- end }} +{{/* +Render RUSTFS_SERVER_DOMAINS +*/}} + +{{- define "rustfs.serverDomains" -}} +{{- $domains := list .Values.config.rustfs.domains -}} +{{- $fullname := include "rustfs.fullname" . -}} +{{- $replicaCount := int .Values.replicaCount -}} +{{- $servicePort := .Values.service.endpoint.port | default 9000 -}} +{{- range $i := until $replicaCount -}} + {{- $podDomain := printf "%s-%d.%s-headless:%d" $fullname $i $fullname (int $servicePort) -}} + {{- $domains = append $domains $podDomain -}} +{{- end -}} +{{- join "," $domains -}} +{{- end -}} \ No newline at end of file diff --git a/helm/rustfs/templates/configmap.yaml b/helm/rustfs/templates/configmap.yaml index 86b4b9907..a92c26fa7 100644 --- a/helm/rustfs/templates/configmap.yaml +++ b/helm/rustfs/templates/configmap.yaml @@ -20,5 +20,5 @@ data: RUSTFS_VOLUMES: "/data" {{- end }} {{- if .Values.config.rustfs.domains }} - RUSTFS_SERVER_DOMAINS: {{ .Values.config.rustfs.domains | quote }} + RUSTFS_SERVER_DOMAINS: {{ include "rustfs.serverDomains" . | quote }} {{- end }} \ No newline at end of file