From 79c221cf0565a5b5e6189244d097a6c732a9e301 Mon Sep 17 00:00:00 2001 From: Niccolo Tosato Date: Mon, 27 Apr 2026 16:30:40 -0400 Subject: [PATCH 1/4] helm(shared-storage): only create PV when hostPath/NFS provided and no storageClass; set PVC.volumeName then Signed-off-by: Niccolo Tosato --- helm/templates/shared-storage.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/helm/templates/shared-storage.yaml b/helm/templates/shared-storage.yaml index 9a9deb400..782912656 100644 --- a/helm/templates/shared-storage.yaml +++ b/helm/templates/shared-storage.yaml @@ -1,5 +1,5 @@ {{- if .Values.sharedPvcStorage.enabled }} -{{- if or (.Values.sharedPvcStorage.hostPath) (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path) }} +{{- if and (not .Values.sharedPvcStorage.storageClass) (or .Values.sharedPvcStorage.hostPath (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path)) }} --- apiVersion: v1 kind: PersistentVolume @@ -10,9 +10,6 @@ metadata: app: {{ .Release.Name }} component: shared-pvc-storage spec: - {{- if .Values.sharedPvcStorage.storageClass }} - storageClassName: {{ .Values.sharedPvcStorage.storageClass }} - {{- end }} capacity: storage: {{ .Values.sharedPvcStorage.size }} accessModes: @@ -48,7 +45,7 @@ spec: resources: requests: storage: {{ .Values.sharedPvcStorage.size }} - {{- if or (.Values.sharedPvcStorage.hostPath) (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path) }} + {{- if and (not .Values.sharedPvcStorage.storageClass) (or .Values.sharedPvcStorage.hostPath (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path)) }} volumeName: {{ .Release.Name }}-shared-pvc-storage {{- end }} {{- end }} From 43a18d3b131eeaa8a0f2ce2a42d72f86b9859ecb Mon Sep 17 00:00:00 2001 From: Niccolo Tosato Date: Mon, 27 Apr 2026 16:39:51 -0400 Subject: [PATCH 2/4] helm(config): set HF_HOME to shared mount when sharedPvcStorage.enabled Signed-off-by: Niccolo Tosato --- helm/templates/deployment-vllm-multi.yaml | 4 +++- helm/templates/ray-cluster.yaml | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/helm/templates/deployment-vllm-multi.yaml b/helm/templates/deployment-vllm-multi.yaml index d405fc63f..e91fd5455 100644 --- a/helm/templates/deployment-vllm-multi.yaml +++ b/helm/templates/deployment-vllm-multi.yaml @@ -214,7 +214,9 @@ spec: - name: PYTHONHASHSEED value: "123" - name: HF_HOME - {{- if hasKey $modelSpec "pvcStorage" }} + {{- if .Values.sharedPvcStorage.enabled }} + value: /data/shared-pvc-storage + {{- else if hasKey $modelSpec "pvcStorage" }} value: /data {{- else }} value: /tmp diff --git a/helm/templates/ray-cluster.yaml b/helm/templates/ray-cluster.yaml index 285761d06..c161c9d01 100644 --- a/helm/templates/ray-cluster.yaml +++ b/helm/templates/ray-cluster.yaml @@ -49,7 +49,9 @@ spec: - name: EXPECTED_NODES value: "{{ add $modelSpec.replicaCount 1}}" - name: HF_HOME - {{- if hasKey $modelSpec "pvcStorage" }} + {{- if $.Values.sharedPvcStorage.enabled }} + value: /data/shared-pvc-storage + {{- else if hasKey $modelSpec "pvcStorage" }} value: /data {{- else }} value: /tmp @@ -294,7 +296,9 @@ spec: fieldRef: fieldPath: status.podIP - name: HF_HOME - {{- if hasKey $modelSpec "pvcStorage" }} + {{- if $.Values.sharedPvcStorage.enabled }} + value: /data/shared-pvc-storage + {{- else if hasKey $modelSpec "pvcStorage" }} value: /data {{- else }} value: /tmp From 4a93f24c11e374783e55f8a9d101fa87d490601c Mon Sep 17 00:00:00 2001 From: Niccolo Tosato Date: Tue, 28 Apr 2026 15:45:34 -0400 Subject: [PATCH 3/4] Remove fix from raycluster Signed-off-by: Niccolo Tosato --- helm/templates/ray-cluster.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/helm/templates/ray-cluster.yaml b/helm/templates/ray-cluster.yaml index c161c9d01..285761d06 100644 --- a/helm/templates/ray-cluster.yaml +++ b/helm/templates/ray-cluster.yaml @@ -49,9 +49,7 @@ spec: - name: EXPECTED_NODES value: "{{ add $modelSpec.replicaCount 1}}" - name: HF_HOME - {{- if $.Values.sharedPvcStorage.enabled }} - value: /data/shared-pvc-storage - {{- else if hasKey $modelSpec "pvcStorage" }} + {{- if hasKey $modelSpec "pvcStorage" }} value: /data {{- else }} value: /tmp @@ -296,9 +294,7 @@ spec: fieldRef: fieldPath: status.podIP - name: HF_HOME - {{- if $.Values.sharedPvcStorage.enabled }} - value: /data/shared-pvc-storage - {{- else if hasKey $modelSpec "pvcStorage" }} + {{- if hasKey $modelSpec "pvcStorage" }} value: /data {{- else }} value: /tmp From 14cd90a287031666a3cb39822ea121047d462caa Mon Sep 17 00:00:00 2001 From: Niccolo Tosato Date: Tue, 28 Apr 2026 15:45:56 -0400 Subject: [PATCH 4/4] Fix discussion Signed-off-by: Niccolo Tosato --- helm/templates/shared-storage.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/templates/shared-storage.yaml b/helm/templates/shared-storage.yaml index 782912656..9a9deb400 100644 --- a/helm/templates/shared-storage.yaml +++ b/helm/templates/shared-storage.yaml @@ -1,5 +1,5 @@ {{- if .Values.sharedPvcStorage.enabled }} -{{- if and (not .Values.sharedPvcStorage.storageClass) (or .Values.sharedPvcStorage.hostPath (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path)) }} +{{- if or (.Values.sharedPvcStorage.hostPath) (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path) }} --- apiVersion: v1 kind: PersistentVolume @@ -10,6 +10,9 @@ metadata: app: {{ .Release.Name }} component: shared-pvc-storage spec: + {{- if .Values.sharedPvcStorage.storageClass }} + storageClassName: {{ .Values.sharedPvcStorage.storageClass }} + {{- end }} capacity: storage: {{ .Values.sharedPvcStorage.size }} accessModes: @@ -45,7 +48,7 @@ spec: resources: requests: storage: {{ .Values.sharedPvcStorage.size }} - {{- if and (not .Values.sharedPvcStorage.storageClass) (or .Values.sharedPvcStorage.hostPath (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path)) }} + {{- if or (.Values.sharedPvcStorage.hostPath) (and .Values.sharedPvcStorage.nfs.server .Values.sharedPvcStorage.nfs.path) }} volumeName: {{ .Release.Name }}-shared-pvc-storage {{- end }} {{- end }}