mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix filer using leveldb2 may lose data
This commit is contained in:
parent
cdb31c5b61
commit
1093e8e6d7
|
@ -154,13 +154,16 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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 }}
|
-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:
|
volumeMounts:
|
||||||
- name: seaweedfs-filer-log-volume
|
- name: seaweedfs-filer-log-volume
|
||||||
mountPath: "/logs/"
|
mountPath: "/logs/"
|
||||||
- mountPath: /etc/sw
|
- mountPath: /etc/sw
|
||||||
name: config-users
|
name: config-users
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
{{- if .Values.filer.enablePVC }}
|
||||||
|
- name: data-filer
|
||||||
|
mountPath: /data
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.global.enableSecurity }}
|
{{- if .Values.global.enableSecurity }}
|
||||||
- name: security-config
|
- name: security-config
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -183,7 +186,6 @@ spec:
|
||||||
mountPath: /usr/local/share/ca-certificates/client/
|
mountPath: /usr/local/share/ca-certificates/client/
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ tpl .Values.filer.extraVolumeMounts . | nindent 12 | trim }}
|
{{ tpl .Values.filer.extraVolumeMounts . | nindent 12 | trim }}
|
||||||
{{- end }}
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.filer.port }}
|
- containerPort: {{ .Values.filer.port }}
|
||||||
name: swfs-filer
|
name: swfs-filer
|
||||||
|
@ -250,16 +252,18 @@ spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ tpl .Values.filer.nodeSelector . | indent 8 | trim }}
|
{{ tpl .Values.filer.nodeSelector . | indent 8 | trim }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{/* volumeClaimTemplates:*/}}
|
{{- if .Values.filer.enablePVC }}
|
||||||
{{/* - metadata:*/}}
|
volumeClaimTemplates:
|
||||||
{{/* name: data-{{ .Release.Namespace }}*/}}
|
- metadata:
|
||||||
{{/* spec:*/}}
|
name: data-filer
|
||||||
{{/* accessModes:*/}}
|
spec:
|
||||||
{{/* - ReadWriteOnce*/}}
|
accessModes:
|
||||||
{{/* resources:*/}}
|
- ReadWriteOnce
|
||||||
{{/* requests:*/}}
|
resources:
|
||||||
{{/* storage: {{ .Values.filer.storage }}*/}}
|
requests:
|
||||||
{{/* {{- if .Values.filer.storageClass }}*/}}
|
storage: {{ .Values.filer.storage }}
|
||||||
{{/* storageClassName: {{ .Values.filer.storageClass }}*/}}
|
{{- if .Values.filer.storageClass }}
|
||||||
{{/* {{- end }}*/}}
|
storageClassName: {{ .Values.filer.storageClass }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -61,6 +61,8 @@ master:
|
||||||
extraVolumes: ""
|
extraVolumes: ""
|
||||||
extraVolumeMounts: ""
|
extraVolumeMounts: ""
|
||||||
|
|
||||||
|
# enablePVC will create a pvc for filer for data persistence.
|
||||||
|
enablePVC: false
|
||||||
# storage and storageClass are the settings for configuring stateful
|
# storage and storageClass are the settings for configuring stateful
|
||||||
# storage for the master pods. storage should be set to the disk size of
|
# storage for the master pods. storage should be set to the disk size of
|
||||||
# the attached volume. storageClass is the class of storage which defaults
|
# the attached volume. storageClass is the class of storage which defaults
|
||||||
|
@ -357,6 +359,7 @@ filer:
|
||||||
WEED_MYSQL_CONNECTION_MAX_LIFETIME_SECONDS: "600"
|
WEED_MYSQL_CONNECTION_MAX_LIFETIME_SECONDS: "600"
|
||||||
# enable usage of memsql as filer backend
|
# enable usage of memsql as filer backend
|
||||||
WEED_MYSQL_INTERPOLATEPARAMS: "true"
|
WEED_MYSQL_INTERPOLATEPARAMS: "true"
|
||||||
|
# if you want to use leveldb2, then should enable "enablePVC". or you may lose your data.
|
||||||
WEED_LEVELDB2_ENABLED: "false"
|
WEED_LEVELDB2_ENABLED: "false"
|
||||||
# with http DELETE, by default the filer would check whether a folder is empty.
|
# with http DELETE, by default the filer would check whether a folder is empty.
|
||||||
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
|
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
|
||||||
|
|
Loading…
Reference in a new issue