add option for existingClaim usage to master-statefulset, fix naming in volume-statefulset

This commit is contained in:
Max Roby
2023-11-19 09:37:37 +01:00
committed by Chris Lu
parent 47095efead
commit 676bcf08d6
3 changed files with 23 additions and 3 deletions

View File

@@ -213,7 +213,8 @@ spec:
{{ tpl .Values.master.resources . | nindent 12 | trim }}
{{- end }}
{{- $hostpath_exists := include "master.hostpath_exists" . -}}
{{- if $hostpath_exists }}
{{- $existing_claims := include "master.existing_claims" . -}}
{{- if or ($hostpath_exists) ($existing_claims) }}
volumes:
{{- if eq .Values.master.logs.type "hostPath" }}
- name: seaweedfs-master-log-volume
@@ -221,12 +222,22 @@ spec:
path: {{ .Values.master.logs.hostPathPrefix }}/logs/seaweedfs/master
type: DirectoryOrCreate
{{- end }}
{{- if eq .Values.master.logs.type "existingClaim" }}
- name: logs
persistentVolumeClaim:
claimName: {{ .Values.master.logs.claimName }}
{{- end }}
{{- if eq .Values.master.data.type "hostPath" }}
- name: data-{{ .Release.Namespace }}
hostPath:
path: {{ .Values.master.data.hostPathPrefix }}/seaweed-master/
type: DirectoryOrCreate
{{- end }}
{{- if eq .Values.master.data.type "existingClaim" }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.master.data.claimName }}
{{- end }}
- name: master-config
configMap:
name: {{ template "seaweedfs.name" . }}-master-config