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

@@ -175,6 +175,15 @@ Inject extra environment vars in the format key:value, if populated
{{- end -}}
{{- end -}}
{{/* check if any Master existingClaim is defined */}}
{{- define "master.existing_claims" -}}
{{- if or (eq .Values.master.data.type "existingClaim") (eq .Values.master.logs.type "existingClaim") -}}
{{- printf "true" -}}
{{- else -}}
{{- printf "" -}}
{{- end -}}
{{- end -}}
{{/* check if any InitContainers exist for Volumes */}}
{{- define "volume.initContainers_exists" -}}
{{- if or (not (empty .Values.volume.dir_idx )) (not (empty .Values.volume.initContainers )) -}}