add support for using an existing claim for volume server

This commit is contained in:
Max Roby 2023-11-18 20:28:09 +01:00 committed by Chris Lu
parent ad9fef7a52
commit f46f28fcf9
2 changed files with 32 additions and 0 deletions

View file

@ -227,18 +227,33 @@ spec:
path: {{ .Values.volume.data.hostPathPrefix }}/object_store/
type: DirectoryOrCreate
{{- 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 }}
- name: idx
hostPath:
path: {{ .Values.volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/
type: DirectoryOrCreate
{{- end }}
{{- if eq .Values.volume.idx.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.volume.idx.claimName }}
{{- end }}
{{- if eq .Values.volume.logs.type "hostPath" }}
- name: logs
hostPath:
path: {{ .Values.volume.logs.hostPathPrefix }}/logs/seaweedfs/volume
type: DirectoryOrCreate
{{- end }}
{{- if eq .Values.volume.logs.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.volume.data.claimName }}
{{- end }}
{{- if .Values.global.enableSecurity }}
- name: security-config
configMap:

View file

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