diff options
| author | LazyDBA247-Anyvision <yonin@anyvision.co> | 2021-02-09 09:46:21 +0200 |
|---|---|---|
| committer | LazyDBA247-Anyvision <yonin@anyvision.co> | 2021-02-09 09:46:21 +0200 |
| commit | 2646f5a7847ffc2117861eaaab749a63f5c471e5 (patch) | |
| tree | 850108ab902ff0c7bb894c8cc5150119275f80e1 | |
| parent | b6fba0c03feeb39c7db36c05da70280f1ca270fb (diff) | |
| download | seaweedfs-2646f5a7847ffc2117861eaaab749a63f5c471e5.tar.xz seaweedfs-2646f5a7847ffc2117861eaaab749a63f5c471e5.zip | |
cronjob: fix and update
enable/disable fix.replication & support for CollectionPrefix filtering
fix toleration and nodeSelector helm templating issues
| -rw-r--r-- | k8s/seaweedfs/templates/cronjob.yaml | 15 | ||||
| -rw-r--r-- | k8s/seaweedfs/values.yaml | 16 |
2 files changed, 19 insertions, 12 deletions
diff --git a/k8s/seaweedfs/templates/cronjob.yaml b/k8s/seaweedfs/templates/cronjob.yaml index 6f4ed8c70..4caf4bad1 100644 --- a/k8s/seaweedfs/templates/cronjob.yaml +++ b/k8s/seaweedfs/templates/cronjob.yaml @@ -15,13 +15,13 @@ spec: backoffLimit: 2 template: spec: - {{- with .Values.cronjob.nodeSelector }} + {{- if .Values.cronjob.nodeSelector }} nodeSelector: - {{- toYaml . | nindent 12 }} + {{ tpl .Values.cronjob.nodeSelector . | indent 12 | trim }} {{- end }} - {{- with .Values.cronjob.tolerations }} + {{- if .Values.cronjob.tolerations }} tolerations: - {{- toYaml . | nindent 12 }} + {{ tpl .Values.cronjob.tolerations . | nindent 12 | trim }} {{- end }} restartPolicy: OnFailure containers: @@ -36,10 +36,13 @@ spec: - | set -ex echo -e "lock\n\ - volume.balance -force\ + volume.balance -force \ {{ if .Values.volume.dataCenter }} -dataCenter {{ .Values.volume.dataCenter }}{{ end }}\ {{ if .Values.cronjob.collection }} -collection {{ .Values.cronjob.collection }}{{ end }}\n\ - volume.fix.replication\nunlock\n" | \ + {{- if .Values.cronjob.enableFixReplication }} + volume.fix.replication -collectionPattern={{ .Values.cronjob.collectionPattern }} \n\ + {{- end }} + unlock\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 2b33a6149..301c9f236 100644 --- a/k8s/seaweedfs/values.yaml +++ b/k8s/seaweedfs/values.yaml @@ -359,17 +359,21 @@ s3: storageClass: "" cronjob: - enabled: false + enabled: true + master: "seaweedfs-master:9333" + filer: "seaweedfs-filer-client:8888" + tolerations: "" + nodeSelector: | + sw-backend: "true" + replication: + enable: true + collectionPattern: "" schedule: "*/7 * * * *" resources: null # balance all volumes among volume servers # ALL|EACH_COLLECTION|<collection_name> collection: "" - master: "" - filer: "" - tolerations: "" - nodeSelector: | - sw-backend: "true" + certificates: commonName: "SeaweedFS CA" |
