aboutsummaryrefslogtreecommitdiff
path: root/k8s
diff options
context:
space:
mode:
Diffstat (limited to 'k8s')
-rw-r--r--k8s/README.md5
-rw-r--r--k8s/seaweedfs/Chart.yaml3
-rw-r--r--k8s/seaweedfs/templates/_helpers.tpl14
-rw-r--r--k8s/seaweedfs/templates/cronjob.yaml18
-rw-r--r--k8s/seaweedfs/templates/filer-service-client.yaml30
-rw-r--r--k8s/seaweedfs/templates/filer-service.yaml11
-rw-r--r--k8s/seaweedfs/templates/filer-statefulset.yaml41
-rw-r--r--k8s/seaweedfs/templates/master-service.yaml3
-rw-r--r--k8s/seaweedfs/templates/master-statefulset.yaml10
-rw-r--r--k8s/seaweedfs/templates/s3-deployment.yaml37
-rw-r--r--k8s/seaweedfs/templates/s3-service.yaml10
-rw-r--r--k8s/seaweedfs/templates/volume-statefulset.yaml13
-rw-r--r--k8s/seaweedfs/values.yaml57
13 files changed, 199 insertions, 53 deletions
diff --git a/k8s/README.md b/k8s/README.md
index 5ec3ab407..6a1eb7a05 100644
--- a/k8s/README.md
+++ b/k8s/README.md
@@ -12,9 +12,12 @@ with ENV.
### current instances config (AIO):
1 instance for each type (master/filer/volume/s3)
-instances need node labels:
+To avoid multiple volume servers on the same node, apply these node labels:
* sw-volume: true (for volume instance, specific tag)
* sw-backend: true (for all others, as they less resource demanding)
+```
+kubectl label node YOUR_NODE_NAME sw-volume=true,sw-backend=true
+```
you can update the replicas count for each node type in values.yaml,
need to add more nodes with the corresponding label.
diff --git a/k8s/seaweedfs/Chart.yaml b/k8s/seaweedfs/Chart.yaml
index ea3317e61..b890cc666 100644
--- a/k8s/seaweedfs/Chart.yaml
+++ b/k8s/seaweedfs/Chart.yaml
@@ -1,4 +1,5 @@
apiVersion: v1
description: SeaweedFS
name: seaweedfs
-version: 2.14 \ No newline at end of file
+appVersion: "2.24"
+version: 2.24
diff --git a/k8s/seaweedfs/templates/_helpers.tpl b/k8s/seaweedfs/templates/_helpers.tpl
index 44d480e66..f6c4fa570 100644
--- a/k8s/seaweedfs/templates/_helpers.tpl
+++ b/k8s/seaweedfs/templates/_helpers.tpl
@@ -52,12 +52,12 @@ Inject extra environment vars in the format key:value, if populated
{{- $registryName := default .Values.image.registry .Values.global.localRegistry | toString -}}
{{- $repositoryName := .Values.image.repository | toString -}}
{{- $name := .Values.global.imageName | toString -}}
-{{- $tag := .Values.global.imageTag | toString -}}
+{{- $tag := .Chart.AppVersion | toString -}}
{{- printf "%s%s%s:%s" $registryName $repositoryName $name $tag -}}
{{- end -}}
{{- end -}}
-{{/* Return the proper postgresqlSchema image */}}
+{{/* Return the proper dbSchema image */}}
{{- define "filer.dbSchema.image" -}}
{{- if .Values.filer.dbSchema.imageOverride -}}
{{- $imageOverride := .Values.filer.dbSchema.imageOverride -}}
@@ -80,7 +80,7 @@ Inject extra environment vars in the format key:value, if populated
{{- $registryName := default .Values.image.registry .Values.global.localRegistry | toString -}}
{{- $repositoryName := .Values.image.repository | toString -}}
{{- $name := .Values.global.imageName | toString -}}
-{{- $tag := .Values.global.imageTag | toString -}}
+{{- $tag := .Chart.AppVersion | toString -}}
{{- printf "%s%s%s:%s" $registryName $repositoryName $name $tag -}}
{{- end -}}
{{- end -}}
@@ -94,7 +94,7 @@ Inject extra environment vars in the format key:value, if populated
{{- $registryName := default .Values.image.registry .Values.global.localRegistry | toString -}}
{{- $repositoryName := .Values.image.repository | toString -}}
{{- $name := .Values.global.imageName | toString -}}
-{{- $tag := .Values.global.imageTag | toString -}}
+{{- $tag := .Chart.AppVersion | toString -}}
{{- printf "%s%s%s:%s" $registryName $repositoryName $name $tag -}}
{{- end -}}
{{- end -}}
@@ -108,7 +108,7 @@ Inject extra environment vars in the format key:value, if populated
{{- $registryName := default .Values.image.registry .Values.global.localRegistry | toString -}}
{{- $repositoryName := .Values.image.repository | toString -}}
{{- $name := .Values.global.imageName | toString -}}
-{{- $tag := .Values.global.imageTag | toString -}}
+{{- $tag := .Chart.AppVersion | toString -}}
{{- printf "%s%s%s:%s" $registryName $repositoryName $name $tag -}}
{{- end -}}
{{- end -}}
@@ -122,7 +122,7 @@ Inject extra environment vars in the format key:value, if populated
{{- $registryName := default .Values.image.registry .Values.global.localRegistry | toString -}}
{{- $repositoryName := .Values.image.repository | toString -}}
{{- $name := .Values.global.imageName | toString -}}
-{{- $tag := .Values.global.imageTag | toString -}}
+{{- $tag := .Chart.AppVersion | toString -}}
{{- printf "%s%s%s:%s" $registryName $repositoryName $name $tag -}}
{{- end -}}
-{{- end -}} \ No newline at end of file
+{{- end -}}
diff --git a/k8s/seaweedfs/templates/cronjob.yaml b/k8s/seaweedfs/templates/cronjob.yaml
index ad4406d4f..c7dcd52b1 100644
--- a/k8s/seaweedfs/templates/cronjob.yaml
+++ b/k8s/seaweedfs/templates/cronjob.yaml
@@ -6,6 +6,7 @@ metadata:
name: {{ include "seaweedfs.fullname" . }}-cronjob
spec:
schedule: "{{ .Values.cronjob.schedule }}"
+ startingDeadlineSeconds: 200
concurrencyPolicy: Forbid
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 2
@@ -14,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:
@@ -35,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 {{ if .Values.cronjob.collectionPattern }} -collectionPattern={{ .Values.cronjob.collectionPattern }} {{ end }} \n\
+ {{- end }}
+ unlock\n" | \
/usr/bin/weed shell \
{{- if .Values.cronjob.master }}
-master {{ .Values.cronjob.master }} \
@@ -51,4 +55,4 @@ spec:
-filer {{ template "seaweedfs.name" . }}-filer.{{ .Release.Namespace }}.svc:{{ .Values.filer.port }}
{{- end }}
{{- end }}
-{{- end }} \ No newline at end of file
+{{- end }}
diff --git a/k8s/seaweedfs/templates/filer-service-client.yaml b/k8s/seaweedfs/templates/filer-service-client.yaml
new file mode 100644
index 000000000..f509086e3
--- /dev/null
+++ b/k8s/seaweedfs/templates/filer-service-client.yaml
@@ -0,0 +1,30 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "seaweedfs.name" . }}-filer-client
+ namespace: {{ .Release.Namespace }}
+ labels:
+ app: {{ template "seaweedfs.name" . }}
+ component: filer
+{{- if .Values.filer.metricsPort }}
+ monitoring: "true"
+{{- end }}
+spec:
+ ports:
+ - name: "swfs-filer"
+ port: {{ .Values.filer.port }}
+ targetPort: {{ .Values.filer.port }}
+ protocol: TCP
+ - name: "swfs-filer-grpc"
+ port: {{ .Values.filer.grpcPort }}
+ targetPort: {{ .Values.filer.grpcPort }}
+ protocol: TCP
+{{- if .Values.filer.metricsPort }}
+ - name: "metrics"
+ port: {{ .Values.filer.metricsPort }}
+ targetPort: {{ .Values.filer.metricsPort }}
+ protocol: TCP
+{{- end }}
+ selector:
+ app: {{ template "seaweedfs.name" . }}
+ component: filer
diff --git a/k8s/seaweedfs/templates/filer-service.yaml b/k8s/seaweedfs/templates/filer-service.yaml
index debc31f6c..45035fc27 100644
--- a/k8s/seaweedfs/templates/filer-service.yaml
+++ b/k8s/seaweedfs/templates/filer-service.yaml
@@ -1,6 +1,8 @@
apiVersion: v1
kind: Service
metadata:
+ annotations:
+ service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
labels:
@@ -8,6 +10,7 @@ metadata:
component: filer
spec:
clusterIP: None
+ publishNotReadyAddresses: true
ports:
- name: "swfs-filer"
port: {{ .Values.filer.port }}
@@ -17,12 +20,6 @@ spec:
port: {{ .Values.filer.grpcPort }}
targetPort: {{ .Values.filer.grpcPort }}
protocol: TCP
-{{- if .Values.filer.metricsPort }}
- - name: "swfs-filer-metrics"
- port: {{ .Values.filer.metricsPort }}
- targetPort: {{ .Values.filer.metricsPort }}
- protocol: TCP
-{{- end }}
selector:
app: {{ template "seaweedfs.name" . }}
- component: filer \ No newline at end of file
+ component: filer
diff --git a/k8s/seaweedfs/templates/filer-statefulset.yaml b/k8s/seaweedfs/templates/filer-statefulset.yaml
index a4f38830f..fc1253479 100644
--- a/k8s/seaweedfs/templates/filer-statefulset.yaml
+++ b/k8s/seaweedfs/templates/filer-statefulset.yaml
@@ -87,6 +87,12 @@ spec:
value: {{ $value | quote }}
{{- end }}
{{- end }}
+ {{- if .Values.global.extraEnvironmentVars }}
+ {{- range $key, $value := .Values.global.extraEnvironmentVars }}
+ - name: {{ $key }}
+ value: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
command:
- "/bin/sh"
- "-ec"
@@ -127,14 +133,36 @@ spec:
-encryptVolumeData \
{{- end }}
-ip=${POD_IP} \
+ {{- if .Values.filer.enable_peers }}
{{- if gt (.Values.filer.replicas | int) 1 }}
- -peers={{ range $index := until (.Values.filer.replicas | int) }}${SEAWEEDFS_FULLNAME}-filer-{{ $index }}.${SEAWEEDFS_FULLNAME}-filer:{{ $.Values.filer.port }}{{ if lt $index (sub ($.Values.filer.replicas | int) 1) }},{{ end }}{{ end }}
+ -peers=$(echo -n "{{ range $index := until (.Values.filer.replicas | int) }}${SEAWEEDFS_FULLNAME}-filer-{{ $index }}.${SEAWEEDFS_FULLNAME}-filer:{{ $.Values.filer.port }}{{ if lt $index (sub ($.Values.filer.replicas | int) 1) }},{{ end }}{{ end }}" | sed "s/$HOSTNAME.${SEAWEEDFS_FULLNAME}-filer:{{ $.Values.filer.port }}//" | sed 's/,$//; 's/^,//'; s/,,/,/;' ) \
+ {{- end }}
+ {{- end }}
+ {{- if .Values.filer.s3.enabled }}
+ -s3 \
+ -s3.port={{ .Values.filer.s3.port }} \
+ {{- if .Values.filer.s3.domainName }}
+ -s3.domainName={{ .Values.filer.s3.domainName }} \
+ {{- end }}
+ {{- if .Values.global.enableSecurity }}
+ -s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
+ -s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
+ {{- end }}
+ {{- if .Values.filer.s3.allowEmptyFolder }}
+ -s3.allowEmptyFolder={{ .Values.filer.s3.allowEmptyFolder }} \
+ {{- end }}
+ {{- if .Values.filer.s3.enableAuth }}
+ -s3.config=/etc/sw/seaweedfs_s3_config \
+ {{- end }}
{{- end }}
-master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}
{{- if or (.Values.global.enableSecurity) (.Values.filer.extraVolumeMounts) }}
volumeMounts:
- name: seaweedfs-filer-log-volume
mountPath: "/logs/"
+ - mountPath: /etc/sw
+ name: config-users
+ readOnly: true
{{- if .Values.global.enableSecurity }}
- name: security-config
readOnly: true
@@ -172,7 +200,7 @@ spec:
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
- timeoutSeconds: 3
+ timeoutSeconds: 10
livenessProbe:
httpGet:
path: /
@@ -182,7 +210,7 @@ spec:
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
- timeoutSeconds: 3
+ timeoutSeconds: 10
{{- if .Values.filer.resources }}
resources:
{{ tpl .Values.filer.resources . | nindent 12 | trim }}
@@ -192,6 +220,13 @@ spec:
hostPath:
path: /storage/logs/seaweedfs/filer
type: DirectoryOrCreate
+ - name: db-schema-config-volume
+ configMap:
+ name: seaweedfs-db-init-config
+ - name: config-users
+ secret:
+ defaultMode: 420
+ secretName: seaweedfs-s3-secret
{{- if .Values.global.enableSecurity }}
- name: security-config
configMap:
diff --git a/k8s/seaweedfs/templates/master-service.yaml b/k8s/seaweedfs/templates/master-service.yaml
index f7603bd91..0ce467538 100644
--- a/k8s/seaweedfs/templates/master-service.yaml
+++ b/k8s/seaweedfs/templates/master-service.yaml
@@ -10,6 +10,7 @@ metadata:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None
+ publishNotReadyAddresses: true
ports:
- name: "swfs-master"
port: {{ .Values.master.port }}
@@ -21,4 +22,4 @@ spec:
protocol: TCP
selector:
app: {{ template "seaweedfs.name" . }}
- component: master \ No newline at end of file
+ component: master
diff --git a/k8s/seaweedfs/templates/master-statefulset.yaml b/k8s/seaweedfs/templates/master-statefulset.yaml
index fe90f3d81..e5a7a537a 100644
--- a/k8s/seaweedfs/templates/master-statefulset.yaml
+++ b/k8s/seaweedfs/templates/master-statefulset.yaml
@@ -76,6 +76,12 @@ spec:
value: {{ $value | quote }}
{{- end }}
{{- end }}
+ {{- if .Values.global.extraEnvironmentVars }}
+ {{- range $key, $value := .Values.global.extraEnvironmentVars }}
+ - name: {{ $key }}
+ value: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
command:
- "/bin/sh"
- "-ec"
@@ -157,7 +163,7 @@ spec:
periodSeconds: 45
successThreshold: 2
failureThreshold: 100
- timeoutSeconds: 5
+ timeoutSeconds: 10
livenessProbe:
httpGet:
path: /cluster/status
@@ -167,7 +173,7 @@ spec:
periodSeconds: 30
successThreshold: 1
failureThreshold: 4
- timeoutSeconds: 5
+ timeoutSeconds: 10
{{- if .Values.master.resources }}
resources:
{{ tpl .Values.master.resources . | nindent 12 | trim }}
diff --git a/k8s/seaweedfs/templates/s3-deployment.yaml b/k8s/seaweedfs/templates/s3-deployment.yaml
index f7244ad76..b513e937b 100644
--- a/k8s/seaweedfs/templates/s3-deployment.yaml
+++ b/k8s/seaweedfs/templates/s3-deployment.yaml
@@ -59,11 +59,17 @@ spec:
fieldPath: metadata.namespace
- name: SEAWEEDFS_FULLNAME
value: "{{ template "seaweedfs.name" . }}"
+ {{- if .Values.global.extraEnvironmentVars }}
+ {{- range $key, $value := .Values.global.extraEnvironmentVars }}
+ - name: {{ $key }}
+ value: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
command:
- "/bin/sh"
- "-ec"
- |
- exec /usr/bin/weed \
+ exec /usr/bin/weed -logdir=/logs \
{{- if .Values.s3.loggingOverrideLevel }}
-v={{ .Values.s3.loggingOverrideLevel }} \
{{- else }}
@@ -81,9 +87,19 @@ spec:
{{- if .Values.s3.domainName }}
-domainName={{ .Values.s3.domainName }} \
{{- end }}
- -filer={{ template "seaweedfs.name" . }}-filer:{{ .Values.filer.port }}
- {{- if or (.Values.global.enableSecurity) (.Values.s3.extraVolumeMounts) }}
+ {{- if .Values.s3.allowEmptyFolder }}
+ -allowEmptyFolder={{ .Values.s3.allowEmptyFolder }} \
+ {{- end }}
+ {{- if .Values.s3.enableAuth }}
+ -config=/etc/sw/seaweedfs_s3_config \
+ {{- end }}
+ -filer={{ template "seaweedfs.name" . }}-filer-client:{{ .Values.filer.port }}
volumeMounts:
+ - name: logs
+ mountPath: "/logs/"
+ - mountPath: /etc/sw
+ name: config-users
+ readOnly: true
{{- if .Values.global.enableSecurity }}
- name: security-config
readOnly: true
@@ -106,7 +122,6 @@ spec:
mountPath: /usr/local/share/ca-certificates/client/
{{- end }}
{{ tpl .Values.s3.extraVolumeMounts . | nindent 12 | trim }}
- {{- end }}
ports:
- containerPort: {{ .Values.s3.port }}
name: swfs-s3
@@ -119,7 +134,7 @@ spec:
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
- timeoutSeconds: 3
+ timeoutSeconds: 10
livenessProbe:
httpGet:
path: /
@@ -129,12 +144,22 @@ spec:
periodSeconds: 60
successThreshold: 1
failureThreshold: 20
- timeoutSeconds: 3
+ timeoutSeconds: 10
{{- if .Values.s3.resources }}
resources:
{{ tpl .Values.s3.resources . | nindent 12 | trim }}
{{- end }}
volumes:
+ - name: config-users
+ secret:
+ defaultMode: 420
+ secretName: seaweedfs-s3-secret
+ {{- if eq .Values.s3.logs.type "hostPath" }}
+ - name: logs
+ hostPath:
+ path: /storage/logs/seaweedfs/s3
+ type: DirectoryOrCreate
+ {{- end }}
{{- if .Values.global.enableSecurity }}
- name: security-config
configMap:
diff --git a/k8s/seaweedfs/templates/s3-service.yaml b/k8s/seaweedfs/templates/s3-service.yaml
index 4a68c7976..122b33298 100644
--- a/k8s/seaweedfs/templates/s3-service.yaml
+++ b/k8s/seaweedfs/templates/s3-service.yaml
@@ -9,15 +9,15 @@ metadata:
spec:
ports:
- name: "swfs-s3"
- port: {{ .Values.s3.port }}
- targetPort: {{ .Values.s3.port }}
+ port: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
+ targetPort: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
protocol: TCP
-{{- if .Values.s3.metricsPort }}
- - name: "swfs-s3-metrics"
+{{- if and .Values.s3.enabled .Values.s3.metricsPort }}
+ - name: "metrics"
port: {{ .Values.s3.metricsPort }}
targetPort: {{ .Values.s3.metricsPort }}
protocol: TCP
{{- end }}
selector:
app: {{ template "seaweedfs.name" . }}
- component: s3 \ No newline at end of file
+ component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}
diff --git a/k8s/seaweedfs/templates/volume-statefulset.yaml b/k8s/seaweedfs/templates/volume-statefulset.yaml
index 6c519f374..f9e55e0d3 100644
--- a/k8s/seaweedfs/templates/volume-statefulset.yaml
+++ b/k8s/seaweedfs/templates/volume-statefulset.yaml
@@ -64,6 +64,12 @@ spec:
fieldPath: status.hostIP
- name: SEAWEEDFS_FULLNAME
value: "{{ template "seaweedfs.name" . }}"
+ {{- if .Values.global.extraEnvironmentVars }}
+ {{- range $key, $value := .Values.global.extraEnvironmentVars }}
+ - name: {{ $key }}
+ value: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
command:
- "/bin/sh"
- "-ec"
@@ -80,6 +86,9 @@ spec:
-metricsPort {{ .Values.volume.metricsPort }} \
{{- end }}
-dir={{ .Values.volume.dir }} \
+ {{- if .Values.volume.dir_idx }}
+ -dir.idx={{ .Values.volume.dir_idx }} \
+ {{- end }}
-max={{ .Values.volume.maxVolumes }} \
{{- if .Values.volume.rack }}
-rack={{ .Values.volume.rack }} \
@@ -149,7 +158,7 @@ spec:
periodSeconds: 90
successThreshold: 1
failureThreshold: 100
- timeoutSeconds: 5
+ timeoutSeconds: 30
livenessProbe:
httpGet:
path: /status
@@ -159,7 +168,7 @@ spec:
periodSeconds: 90
successThreshold: 1
failureThreshold: 4
- timeoutSeconds: 5
+ timeoutSeconds: 30
{{- if .Values.volume.resources }}
resources:
{{ tpl .Values.volume.resources . | nindent 12 | trim }}
diff --git a/k8s/seaweedfs/values.yaml b/k8s/seaweedfs/values.yaml
index 7667d2815..273ab21ad 100644
--- a/k8s/seaweedfs/values.yaml
+++ b/k8s/seaweedfs/values.yaml
@@ -4,7 +4,7 @@ global:
registry: ""
repository: ""
imageName: chrislusf/seaweedfs
- imageTag: "2.16"
+ # imageTag: "2.24" - started using {.Chart.appVersion}
imagePullPolicy: IfNotPresent
imagePullSecrets: imagepullsecret
restartPolicy: Always
@@ -21,6 +21,10 @@ global:
# Y number of replica in other racks in the same data center
# Z number of replica in other servers in the same rack
replicationPlacment: "001"
+ extraEnvironmentVars:
+ WEED_CLUSTER_DEFAULT: "sw"
+ WEED_CLUSTER_SW_MASTER: "seaweedfs-master:9333"
+ WEED_CLUSTER_SW_FILER: "seaweedfs-filer-client:8888"
image:
registry: ""
@@ -132,7 +136,7 @@ volume:
# limit file size to avoid out of memory, default 256mb
fileSizeLimitMB: null
# minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly
- minFreeSpacePercent: 1
+ minFreeSpacePercent: 7
# limit background compaction or copying speed in mega bytes per second
@@ -140,6 +144,8 @@ volume:
# Directories to store data files. dir[,dir]... (default "/tmp")
dir: "/data"
+ # Directories to store index files. dir[,dir]... (default "/tmp")
+ dir_idx: null
# Maximum numbers of volumes, count[,count]...
# If set to zero on non-windows OS, the limit will be auto configured. (default "7")
@@ -223,6 +229,8 @@ filer:
maxMB: null
# encrypt data on volume servers
encryptVolumeData: false
+ # enable peers sync metadata, for leveldb (localdb for filer but with sync across)
+ enable_peers: false
# Whether proxy or redirect to volume server during file GET request
redirectOnRead: false
@@ -292,8 +300,10 @@ filer:
WEED_MYSQL_HOSTNAME: "mysql-db-host"
WEED_MYSQL_PORT: "3306"
WEED_MYSQL_DATABASE: "sw_database"
- WEED_MYSQL_CONNECTION_MAX_IDLE: "10"
- WEED_MYSQL_CONNECTION_MAX_OPEN: "150"
+ WEED_MYSQL_CONNECTION_MAX_IDLE: "5"
+ WEED_MYSQL_CONNECTION_MAX_OPEN: "75"
+ # "refresh" connection every 10 minutes, eliminating mysql closing "old" connections
+ WEED_MYSQL_CONNECTION_MAX_LIFETIME_SECONDS: "600"
# enable usage of memsql as filer backend
WEED_MYSQL_INTERPOLATEPARAMS: "true"
WEED_LEVELDB2_ENABLED: "false"
@@ -303,8 +313,19 @@ filer:
# directories under this folder will be automatically creating a separate bucket
WEED_FILER_BUCKETS_FOLDER: "/buckets"
+ s3:
+ enabled: true
+ port: 8333
+ #allow empty folders
+ allowEmptyFolder: false
+ # Suffix of the host name, {bucket}.{domainName}
+ domainName: ""
+ # enable user & permission to s3 (need to inject to all services)
+ enableAuth: false
+ skipAuthSecretCreation: false
+
s3:
- enabled: true
+ enabled: false
repository: null
imageName: null
imageTag: null
@@ -313,6 +334,11 @@ s3:
port: 8333
metricsPort: 9327
loggingOverrideLevel: null
+ #allow empty folders
+ allowEmptyFolder: true
+ # enable user & permission to s3 (need to inject to all services)
+ enableAuth: false
+ skipAuthSecretCreation: false
# Suffix of the host name, {bucket}.{domainName}
domainName: ""
@@ -343,18 +369,27 @@ s3:
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""
+ logs:
+ type: "hostPath"
+ size: ""
+ 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"