diff --git a/k8s/seaweedfs/templates/cronjob.yaml b/k8s/seaweedfs/templates/cronjob.yaml index 6abc6003a..5442c44a9 100644 --- a/k8s/seaweedfs/templates/cronjob.yaml +++ b/k8s/seaweedfs/templates/cronjob.yaml @@ -35,7 +35,7 @@ spec: - -c - | set -ex - echo -e "lock\nvolume.balance -force -dataCenter {{ .Values.dataCenter }}\nvolume.fix.replication\nunlock\n" | \ + echo -e "lock\nvolume.balance -force{{ if .Values.volume.dataCenter }} -dataCenter {{ .Values.volume.dataCenter }}{{ end }}\nvolume.fix.replication\nunlock\n" | \ /usr/bin/weed shell \ {{- if .Values.cronjob.master }} -master {{ .Values.cronjob.master }} \