diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index eef8f521f..f23ce472d 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -59,11 +59,11 @@ spec: image: {{ template "volume.image" . }} imagePullPolicy: {{ .Values.global.imagePullPolicy | default "IfNotPresent" }} command: [ '/bin/sh', '-c' ] - args: [ 'ls {{range $dir := .Values.volume.dataDirs }}/{{$dir.name}}/*.idx {{end}} && xargs -I {} mv {} /idx/' ] + args: [ '{{range $dir := .Values.volume.dataDirs }}if ls /{{$dir.name}}/*.idx >/dev/null 2>&1; then mv /{{$dir.name}}/*.idx /idx/ ; fi; {{end}}' ] volumeMounts: - name: idx mountPath: /idx - {{- range $dir := .Values.volume.dataDirs }} + {{- range $dir := .Values.volume.dataDirs }} - name: {{ $dir.name }} mountPath: /{{ $dir.name }} {{- end }} @@ -237,7 +237,7 @@ spec: {{- if eq $dir.type "existingClaim" }} - name: {{ $dir.name }} persistentVolumeClaim: - claimName: {{ $dir.claimName }} + claimName: {{ $dir.claimName }} {{- end }} {{- end }} @@ -252,7 +252,7 @@ spec: {{- if eq .Values.volume.idx.type "existingClaim" }} - name: idx persistentVolumeClaim: - claimName: {{ .Values.volume.idx.claimName }} + claimName: {{ .Values.volume.idx.claimName }} {{- end }} {{- end }} @@ -266,7 +266,7 @@ spec: {{- if eq .Values.volume.logs.type "existingClaim" }} - name: logs persistentVolumeClaim: - claimName: {{ .Values.volume.logs.claimName }} + claimName: {{ .Values.volume.logs.claimName }} {{- end }} {{- end }} {{- if .Values.global.enableSecurity }} diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index f8938ac1f..117924c57 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -97,7 +97,7 @@ master: size: "" storageClass: "" hostPathPrefix: /storage - + ## @param master.sidecars Add additional sidecar containers to the master pod(s) ## e.g: ## sidecars: @@ -256,16 +256,16 @@ volume: # maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7") dataDirs: - - name: data1 - type: "hostPath" - hostPathPrefix: /ssd - maxVolumes: 0 + - name: data1 + type: "hostPath" + hostPathPrefix: /ssd + maxVolumes: 0 - #- name: data2 - # type: "persistentVolumeClaim" - # storageClass: "yourClassNameOfChoice" - # size: "800Gi" - # maxVolumes: 0 + # - name: data2 + # type: "persistentVolumeClaim" + # storageClass: "yourClassNameOfChoice" + # size: "800Gi" + # maxVolumes: 0 # idx can be defined by: # @@ -310,7 +310,7 @@ volume: # Adjust jpg orientation when uploading. imagesFixOrientation: false - + ## @param volume.sidecars Add additional sidecar containers to the volume pod(s) ## e.g: ## sidecars: @@ -464,7 +464,7 @@ filer: size: "" storageClass: "" hostPathPrefix: /storage - + ## @param filer.sidecars Add additional sidecar containers to the filer pod(s) ## e.g: ## sidecars: @@ -657,7 +657,7 @@ s3: # Suffix of the host name, {bucket}.{domainName} domainName: "" - + ## @param s3.sidecars Add additional sidecar containers to the s3 pod(s) ## e.g: ## sidecars: