From 3239425c19dbcac798908dd6bd7a938a83aa4b3b Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Sun, 25 Oct 2020 20:20:49 +0500 Subject: [PATCH] use collection optionaly --- k8s/seaweedfs/templates/cronjob.yaml | 2 +- k8s/seaweedfs/values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/k8s/seaweedfs/templates/cronjob.yaml b/k8s/seaweedfs/templates/cronjob.yaml index 5442c44a9..cc8992a6a 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{{ if .Values.volume.dataCenter }} -dataCenter {{ .Values.volume.dataCenter }}{{ end }}\nvolume.fix.replication\nunlock\n" | \ + echo -e "lock\nvolume.balance -force{{ if .Values.volume.dataCenter }} -dataCenter {{ .Values.volume.dataCenter }}{{ end }}{{ if .Values.cronjob.collection }} -collection {{ .Values.cronjob.collection }}{{ end }}\nvolume.fix.replication\nunlock\n" | \ /usr/bin/weed shell \ {{- if .Values.cronjob.master }} -master {{ .Values.cronjob.master }} \ diff --git a/k8s/seaweedfs/values.yaml b/k8s/seaweedfs/values.yaml index 28887605f..bf814ad14 100644 --- a/k8s/seaweedfs/values.yaml +++ b/k8s/seaweedfs/values.yaml @@ -351,6 +351,9 @@ cronjob: enabled: false schedule: "*/7 * * * *" resources: null + # balance all volumes among volume servers + # ALL|EACH_COLLECTION| + collection: "" master: "" filer: "" tolerations: ""