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
Always include volumes in statefulsets
Bálint József Jánvári43a6b603752c
diff --git a/k8s/charts/seaweedfs/templates/_helpers.tpl b/k8s/charts/seaweedfs/templates/_helpers.tplindex 8babbf93ba..dd118c86ba 100644--- a/k8s/charts/seaweedfs/templates/_helpers.tpl+++ b/k8s/charts/seaweedfs/templates/_helpers.tpl@@ -122,19 +122,6 @@ Inject extra environment vars in the format key:value, if populated{{- end -}}{{- end -}}-{{/* check if any Volume HostPath exists */}}-{{- define "volume.hostpath_exists" -}}-{{- if or (or (eq .Values.volume.data.type "hostPath") (and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx )) (eq .Values.volume.logs.type "hostPath") -}}-{{- printf "true" -}}-{{- else -}}-{{- if or .Values.global.enableSecurity .Values.volume.extraVolumes -}}-{{- printf "true" -}}-{{- else -}}-{{- printf "" -}}-{{- end -}}-{{- end -}}-{{- end -}}-{{/* check if any Filer PVC exists */}}{{- define "filer.pvc_exists" -}}{{- if or (eq .Values.filer.data.type "persistentVolumeClaim") (eq .Values.filer.logs.type "persistentVolumeClaim") -}}@@ -144,15 +131,6 @@ Inject extra environment vars in the format key:value, if populated{{- end -}}{{- end -}}-{{/* check if any Filer HostPath exists */}}-{{- define "filer.hostpath_exists" -}}-{{- if or (eq .Values.filer.data.type "hostPath") (eq .Values.filer.logs.type "hostPath") -}}-{{- printf "true" -}}-{{- else -}}-{{- printf "" -}}-{{- end -}}-{{- end -}}-{{/* check if any Master PVC exists */}}{{- define "master.pvc_exists" -}}{{- if or (eq .Values.master.data.type "persistentVolumeClaim") (eq .Values.master.logs.type "persistentVolumeClaim") -}}@@ -162,28 +140,6 @@ Inject extra environment vars in the format key:value, if populated{{- end -}}{{- end -}}-{{/* check if any Master HostPath exists */}}-{{- define "master.hostpath_exists" -}}-{{- if or (eq .Values.master.data.type "hostPath") (eq .Values.master.logs.type "hostPath") -}}-{{- printf "true" -}}-{{- else -}}-{{- if or .Values.global.enableSecurity .Values.volume.extraVolumes -}}-{{- printf "true" -}}-{{- else -}}-{{- printf "" -}}-{{- end -}}-{{- end -}}-{{- end -}}--{{/* check if any Master existingClaim is defined */}}-{{- define "master.existing_claims" -}}-{{- if or (eq .Values.master.data.type "existingClaim") (eq .Values.master.logs.type "existingClaim") -}}-{{- printf "true" -}}-{{- else -}}-{{- printf "" -}}-{{- end -}}-{{- end -}}-{{/* check if any InitContainers exist for Volumes */}}{{- define "volume.initContainers_exists" -}}{{- if or (not (empty .Values.volume.dir_idx )) (not (empty .Values.volume.initContainers )) -}}diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yamlindex db36d4ab6b..19c30f07de 100644--- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml+++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml@@ -212,9 +212,6 @@ spec:resources:{{ tpl .Values.master.resources . | nindent 12 | trim }}{{- end }}- {{- $hostpath_exists := include "master.hostpath_exists" . -}}- {{- $existing_claims := include "master.existing_claims" . -}}- {{- if or ($hostpath_exists) ($existing_claims) }}volumes:{{- if eq .Values.master.logs.type "hostPath" }}- name: seaweedfs-master-log-volume@@ -262,7 +259,6 @@ spec:secretName: {{ template "seaweedfs.name" . }}-client-cert{{- end }}{{ tpl .Values.master.extraVolumes . | indent 8 | trim }}- {{- end }}{{- if .Values.master.nodeSelector }}nodeSelector:{{ tpl .Values.master.nodeSelector . | indent 8 | trim }}diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yamlindex e743116733..1b8c9267ed 100644--- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml+++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml@@ -218,8 +218,6 @@ spec:resources:{{ tpl .Values.volume.resources . | nindent 12 | trim }}{{- end }}- {{- $hostpath_exists := include "volume.hostpath_exists" . -}}- {{- if $hostpath_exists }}volumes:{{- if eq .Values.volume.data.type "hostPath" }}- name: data@@ -277,7 +275,6 @@ spec:{{- if .Values.volume.extraVolumes }}{{ tpl .Values.volume.extraVolumes . | indent 8 | trim }}{{- end }}- {{- end }}{{- if .Values.volume.nodeSelector }}nodeSelector:{{ tpl .Values.volume.nodeSelector . | indent 8 | trim }}