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
feat: Add PVC Storage option to Filer Logs.
Kaiwalya Joshi53e353697569
diff --git a/k8s/helm_charts2/templates/_helpers.tpl b/k8s/helm_charts2/templates/_helpers.tplindex 688efaa234..57b6b7a75b 100644--- a/k8s/helm_charts2/templates/_helpers.tpl+++ b/k8s/helm_charts2/templates/_helpers.tpl@@ -113,7 +113,7 @@ Inject extra environment vars in the format key:value, if populated{{- end -}}{{- end -}}-{{/* check if any PVC exists */}}+{{/* check if any Volume PVC exists */}}{{- define "volume.pvc_exists" -}}{{- if or (or (eq .Values.volume.data.type "persistentVolumeClaim") (and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx )) (eq .Values.volume.logs.type "persistentVolumeClaim") -}}{{- printf "true" -}}@@ -122,7 +122,7 @@ Inject extra environment vars in the format key:value, if populated{{- end -}}{{- end -}}-{{/* check if any HostPath exists */}}+{{/* 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" -}}@@ -134,3 +134,21 @@ Inject extra environment vars in the format key:value, if populated{{- 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") -}}+{{- printf "true" -}}+{{- else -}}+{{- printf "false" -}}+{{- 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 "false" -}}+{{- end -}}+{{- end -}}\ No newline at end of filediff --git a/k8s/helm_charts2/templates/filer-statefulset.yaml b/k8s/helm_charts2/templates/filer-statefulset.yamlindex 21a4256be7..266c95a98f 100644--- a/k8s/helm_charts2/templates/filer-statefulset.yaml+++ b/k8s/helm_charts2/templates/filer-statefulset.yaml@@ -216,10 +216,18 @@ spec:{{ tpl .Values.filer.resources . | nindent 12 | trim }}{{- end }}volumes:+ {{- if eq .Values.filer.logs.type "hostPath" }}- name: seaweedfs-filer-log-volumehostPath:path: /storage/logs/seaweedfs/filertype: DirectoryOrCreate+ {{- end }}+ {{- if eq .Values.filer.data.type "hostPath" }}+ - name: data-filer+ hostPath:+ path: /storage/filer_store+ type: DirectoryOrCreate+ {{- end }}- name: db-schema-config-volumeconfigMap:name: seaweedfs-db-init-config@@ -253,6 +261,7 @@ spec:{{ tpl .Values.filer.nodeSelector . | indent 8 | trim }}{{- end }}{{- if .Values.filer.enablePVC }}+ # DEPRECATION: Deprecate in favor of filer.data section belowvolumeClaimTemplates:- metadata:name: data-filer@@ -266,4 +275,28 @@ spec:storageClassName: {{ .Values.filer.storageClass }}{{- end }}{{- end }}+ {{- $pvc_exists := include "filer.pvc_exists" . -}}+ {{- if $pvc_exists }}+ volumeClaimTemplates:+ {{- if eq .Values.filer.data.type "persistentVolumeClaim"}}+ - metadata:+ name: data-filer+ spec:+ accessModes: [ "ReadWriteOnce" ]+ storageClassName: {{ .Values.filer.data.storageClass }}+ resources:+ requests:+ storage: {{ .Values.filer.data.size }}+ {{- end }}+ {{- if eq .Values.filer.logs.type "persistentVolumeClaim"}}+ - metadata:+ name: seaweedfs-filer-log-volume+ spec:+ accessModes: [ "ReadWriteOnce" ]+ storageClassName: {{ .Values.filer.logs.storageClass }}+ resources:+ requests:+ storage: {{ .Values.filer.logs.size }}+ {{- end }}+ {{- end }}{{- end }}diff --git a/k8s/helm_charts2/values.yaml b/k8s/helm_charts2/values.yamlindex b5d059ee9e..cd55cd8b6f 100644--- a/k8s/helm_charts2/values.yaml+++ b/k8s/helm_charts2/values.yaml@@ -156,7 +156,7 @@ volume:# minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnlyminFreeSpacePercent: 7-# can use ANY storage-class , example with local-path-provisner+# can use ANY storage-class , example with local-path-provisioner# data:# type: "persistentVolumeClaim"# size: "24Ti"@@ -275,16 +275,32 @@ filer:# Disable http request, only gRpc operations are alloweddisableHttp: false+ # DEPRECATE: enablePVC, storage, storageClass+ # Consider replacing with filer.data section below instead.++ # Settings for configuring stateful storage of filer pods.# enablePVC will create a pvc for filer for data persistence.enablePVC: false-- # storage and storageClass are the settings for configuring stateful- # storage for the master pods. storage should be set to the disk size of- # the attached volume. storageClass is the class of storage which defaults- # to null (the Kube cluster will pick the default).+ # storage should be set to the disk size of the attached volume.storage: 25Gi+ # storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).storageClass: null+ # can use ANY storage-class , example with local-path-provisioner+ # data:+ # type: "persistentVolumeClaim"+ # size: "24Ti"+ # storageClass: "local-path-provisioner"+ data:+ type: "hostPath"+ size: ""+ storageClass: ""++ logs:+ type: "hostPath"+ size: ""+ storageClass: ""+extraVolumes: ""extraVolumeMounts: ""