diff --git a/helm/templates/deployment-vllm-multi.yaml b/helm/templates/deployment-vllm-multi.yaml index b197a609..4563839c 100644 --- a/helm/templates/deployment-vllm-multi.yaml +++ b/helm/templates/deployment-vllm-multi.yaml @@ -392,9 +392,14 @@ spec: {{- end}} {{- if hasKey $modelSpec "pvcStorage" }} - name: {{ .Release.Name }}-storage + {{- if and (kindIs "map" $modelSpec.pvcStorage) (hasKey $modelSpec.pvcStorage "emptyDir") }} + emptyDir: + {{- toYaml $modelSpec.pvcStorage.emptyDir | nindent 12 }} + {{- else if kindIs "string" $modelSpec.pvcStorage }} persistentVolumeClaim: claimName: "{{ .Release.Name }}-{{$modelSpec.name}}-storage-claim" {{- end }} + {{- end }} {{- if hasKey $.Values "sharedPvcStorage" }} - name: {{ .Release.Name }}-shared-pvc-storage persistentVolumeClaim: diff --git a/helm/templates/pvc.yaml b/helm/templates/pvc.yaml index 9aef8578..c67b8869 100644 --- a/helm/templates/pvc.yaml +++ b/helm/templates/pvc.yaml @@ -2,7 +2,7 @@ {{- if .Values.servingEngineSpec.enableEngine -}} {{- range $modelSpec := .Values.servingEngineSpec.modelSpec }} {{- with $ -}} -{{- if and (hasKey $modelSpec "pvcStorage") (not (empty $modelSpec.pvcStorage)) }} +{{- if and (hasKey $modelSpec "pvcStorage") (not (empty $modelSpec.pvcStorage)) (kindIs "string" $modelSpec.pvcStorage) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: