diff options
| author | chrislu <chris.lu@gmail.com> | 2024-05-22 20:39:31 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-05-22 20:39:31 -0700 |
| commit | 73d008fafa2969865bc7085b6141304bc27a4b8a (patch) | |
| tree | 68c390f11f802008a69e44ee6544d540f768da1a | |
| parent | 554ae09f8236206e121c2b229eaa96e0858832ed (diff) | |
| parent | 9497db71e6f6c2f8fbc92ed2baa557a97693a13d (diff) | |
| download | seaweedfs-73d008fafa2969865bc7085b6141304bc27a4b8a.tar.xz seaweedfs-73d008fafa2969865bc7085b6141304bc27a4b8a.zip | |
Merge branch 'master' into mq
| -rw-r--r-- | k8s/charts/seaweedfs/templates/filer-statefulset.yaml | 14 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/templates/master-statefulset.yaml | 18 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/templates/s3-deployment.yaml | 8 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/templates/volume-statefulset.yaml | 12 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/values.yaml | 35 | ||||
| -rw-r--r-- | weed/shell/command_fs_meta_load.go | 3 |
6 files changed, 75 insertions, 15 deletions
diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml index d83d3a639..77457be74 100644 --- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml @@ -129,7 +129,7 @@ spec: - "-ec" - | exec /usr/bin/weed \ - {{- if eq .Values.filer.logs.type "hostPath" }} + {{- if or (eq .Values.filer.logs.type "hostPath") (eq .Values.filer.logs.type "emptyDir") }} -logdir=/logs \ {{- else }} -logtostderr=true \ @@ -197,7 +197,7 @@ spec: {{- end }} -master={{ if .Values.global.masterServer }}{{.Values.global.masterServer}}{{ else }}{{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}{{ end }} volumeMounts: - {{- if eq .Values.filer.logs.type "hostPath" }} + {{- if or (eq .Values.filer.logs.type "hostPath") (eq .Values.filer.logs.type "emptyDir") }} - name: seaweedfs-filer-log-volume mountPath: "/logs/" {{- end }} @@ -206,7 +206,7 @@ spec: mountPath: /etc/sw readOnly: true {{- end }} - {{- if (or .Values.filer.enablePVC (or (eq .Values.filer.data.type "hostPath") (eq .Values.filer.data.type "persistentVolumeClaim"))) }} + {{- if (or .Values.filer.enablePVC (or (eq .Values.filer.data.type "hostPath") (eq .Values.filer.data.type "persistentVolumeClaim") (eq .Values.filer.data.type "emptyDir"))) }} - name: data-filer mountPath: /data {{- end }} @@ -285,6 +285,10 @@ spec: persistentVolumeClaim: claimName: {{ .Values.filer.logs.claimName }} {{- end }} + {{- if eq .Values.filer.logs.type "emptyDir" }} + - name: seaweedfs-filer-log-volume + emptyDir: {} + {{- end }} {{- if eq .Values.filer.data.type "hostPath" }} - name: data-filer hostPath: @@ -296,6 +300,10 @@ spec: persistentVolumeClaim: claimName: {{ .Values.filer.data.claimName }} {{- end }} + {{- if eq .Values.filer.data.type "emptyDir" }} + - name: data-filer + emptyDir: {} + {{- end }} - name: db-schema-config-volume configMap: name: seaweedfs-db-init-config diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index 1f196fb9c..00fb6f913 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -108,9 +108,9 @@ spec: command: - "/bin/sh" - "-ec" - - | + - | exec /usr/bin/weed \ - {{- if eq .Values.master.logs.type "hostPath" }} + {{- if or (eq .Values.master.logs.type "hostPath") (eq .Values.master.logs.type "emptyDir") }} -logdir=/logs \ {{- else }} -logtostderr=true \ @@ -158,7 +158,7 @@ spec: volumeMounts: - name : data-{{ .Release.Namespace }} mountPath: /data - {{- if eq .Values.master.logs.type "hostPath" }} + {{- if or (eq .Values.master.logs.type "hostPath") (eq .Values.master.logs.type "emptyDir") }} - name: seaweedfs-master-log-volume mountPath: "/logs/" {{- end }} @@ -241,7 +241,11 @@ spec: {{- if eq .Values.master.logs.type "existingClaim" }} - name: seaweedfs-master-log-volume persistentVolumeClaim: - claimName: {{ .Values.master.logs.claimName }} + claimName: {{ .Values.master.logs.claimName }} + {{- end }} + {{- if eq .Values.master.logs.type "emptyDir" }} + - name: seaweedfs-master-log-volume + emptyDir: {} {{- end }} {{- if eq .Values.master.data.type "hostPath" }} - name: data-{{ .Release.Namespace }} @@ -252,7 +256,11 @@ spec: {{- if eq .Values.master.data.type "existingClaim" }} - name: data-{{ .Release.Namespace }} persistentVolumeClaim: - claimName: {{ .Values.master.data.claimName }} + claimName: {{ .Values.master.data.claimName }} + {{- end }} + {{- if eq .Values.master.data.type "emptyDir" }} + - name: data-{{ .Release.Namespace }} + emptyDir: {} {{- end }} - name: master-config configMap: diff --git a/k8s/charts/seaweedfs/templates/s3-deployment.yaml b/k8s/charts/seaweedfs/templates/s3-deployment.yaml index 7a02524a0..365a32cdf 100644 --- a/k8s/charts/seaweedfs/templates/s3-deployment.yaml +++ b/k8s/charts/seaweedfs/templates/s3-deployment.yaml @@ -99,7 +99,7 @@ spec: - "-ec" - | exec /usr/bin/weed \ - {{- if eq .Values.s3.logs.type "hostPath" }} + {{- if or (eq .Values.s3.logs.type "hostPath") (eq .Values.s3.logs.type "emptyDir") }} -logdir=/logs \ {{- else }} -logtostderr=true \ @@ -136,7 +136,7 @@ spec: {{- end }} -filer={{ template "seaweedfs.name" . }}-filer-client.{{ .Release.Namespace }}:{{ .Values.filer.port }} volumeMounts: - {{- if eq .Values.s3.logs.type "hostPath" }} + {{- if or (eq .Values.s3.logs.type "hostPath") (eq .Values.s3.logs.type "emptyDir") }} - name: logs mountPath: "/logs/" {{- end }} @@ -225,6 +225,10 @@ spec: path: {{ .Values.s3.logs.hostPathPrefix }}/logs/seaweedfs/s3 type: DirectoryOrCreate {{- end }} + {{- if eq .Values.s3.logs.type "emptyDir" }} + - name: logs + emptyDir: {} + {{- end }} {{- if .Values.global.enableSecurity }} - name: security-config configMap: diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index b691f3045..8732a810c 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -261,6 +261,10 @@ spec: persistentVolumeClaim: claimName: {{ $dir.claimName }} {{- end }} + {{- if eq $dir.type "emptyDir" }} + - name: {{ $dir.name }} + emptyDir: {} + {{- end }} {{- end }} @@ -276,6 +280,10 @@ spec: persistentVolumeClaim: claimName: {{ .Values.volume.idx.claimName }} {{- end }} + {{- if eq .Values.volume.idx.type "emptyDir" }} + - name: idx + emptyDir: {} + {{- end }} {{- end }} {{- if .Values.volume.logs }} @@ -290,6 +298,10 @@ spec: persistentVolumeClaim: claimName: {{ .Values.volume.logs.claimName }} {{- end }} + {{- if eq .Values.volume.logs.type "emptyDir" }} + - name: logs + emptyDir: {} + {{- end }} {{- end }} {{- if .Values.global.enableSecurity }} - name: security-config diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index 8962e8d34..2e09887cc 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -93,11 +93,18 @@ master: # data: # type: "existingClaim" # claimName: "my-pvc" + # + # You can also use emptyDir storage: + # data: + # type: "emptyDir" data: type: "hostPath" storageClass: "" hostPathPrefix: /ssd + # You can also use emptyDir storage: + # logs: + # type: "emptyDir" logs: type: "hostPath" size: "" @@ -275,9 +282,14 @@ volume: # maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7") # # You may also spacify an existing claim: - # - name: data - # type: "existingClaim" - # claimName: "my-pvc" + # - name: data + # type: "existingClaim" + # claimName: "my-pvc" + # maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7") + # + # You can also use emptyDir storage: + # - name: data + # type: "emptyDir" # maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7") dataDirs: @@ -310,6 +322,11 @@ volume: # idx: # type: "existingClaim" # claimName: "myClaim" + # + # or + # + # idx: + # type: "emptyDir" # same applies to "logs" @@ -499,12 +516,19 @@ filer: # data: # type: "existingClaim" # claimName: "my-pvc" + # + # You can also use emptyDir storage: + # data: + # type: "emptyDir" data: type: "hostPath" size: "" storageClass: "" hostPathPrefix: /storage + # You can also use emptyDir storage: + # logs: + # type: "emptyDir" logs: type: "hostPath" size: "" @@ -741,7 +765,7 @@ s3: # should map directly to the value of the resources field for a PodSpec, # formatted as a multi-line string. By default no direct resource request # is made. - resources: {} + resources: null # Toleration Settings for server pods # This should be a multi-line string matching the Toleration array @@ -783,6 +807,9 @@ s3: # allowPrivilegeEscalation: false containerSecurityContext: {} + # You can also use emptyDir storage: + # logs: + # type: "emptyDir" logs: type: "hostPath" size: "" diff --git a/weed/shell/command_fs_meta_load.go b/weed/shell/command_fs_meta_load.go index a2ae9401d..5f6559867 100644 --- a/weed/shell/command_fs_meta_load.go +++ b/weed/shell/command_fs_meta_load.go @@ -32,7 +32,8 @@ func (c *commandFsMetaLoad) Help() string { fs.meta.load <filer_host>-<port>-<time>.meta fs.meta.load -v=false <filer_host>-<port>-<time>.meta // skip printing out the verbose output - fs.meta.load -dirPrefix=/buckets/important* <filer_host>.meta // load any dirs with prefix "important" + fs.meta.load -concurrency=1 <filer_host>-<port>-<time>.meta // number of parallel meta load to filer + fs.meta.load -dirPrefix=/buckets/important <filer_host>.meta // load any dirs with prefix "important" ` } |
