Browse Source

add support for using an existing claim for volume server

pull/5040/head
Max Roby 1 year ago
committed by Chris Lu
parent
commit
f46f28fcf9
  1. 15
      k8s/charts/seaweedfs/templates/volume-statefulset.yaml
  2. 17
      k8s/charts/seaweedfs/values.yaml

15
k8s/charts/seaweedfs/templates/volume-statefulset.yaml

@ -227,18 +227,33 @@ spec:
path: {{ .Values.volume.data.hostPathPrefix }}/object_store/ path: {{ .Values.volume.data.hostPathPrefix }}/object_store/
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.volume.data.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.volume.data.claimName }}
{{- end }}
{{- if and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx }} {{- if and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx }}
- name: idx - name: idx
hostPath: hostPath:
path: {{ .Values.volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/ path: {{ .Values.volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.volume.idx.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.volume.idx.claimName }}
{{- end }}
{{- if eq .Values.volume.logs.type "hostPath" }} {{- if eq .Values.volume.logs.type "hostPath" }}
- name: logs - name: logs
hostPath: hostPath:
path: {{ .Values.volume.logs.hostPathPrefix }}/logs/seaweedfs/volume path: {{ .Values.volume.logs.hostPathPrefix }}/logs/seaweedfs/volume
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.volume.logs.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.volume.data.claimName }}
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
configMap: configMap:

17
k8s/charts/seaweedfs/values.yaml

@ -77,6 +77,12 @@ master:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
#
# You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: "" size: ""
@ -222,6 +228,12 @@ volume:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
#
# You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: "" size: ""
@ -391,6 +403,11 @@ filer:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
#
# You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: "" size: ""

Loading…
Cancel
Save