Skip to content

Commit 22aadd5

Browse files
committed
fix: duplicate creating k8s pod volumes
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent 5729275 commit 22aadd5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

gpustack_runtime/deployer/kuberentes.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
_LABEL_WORKLOAD = f"{envs.GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX}/workload"
5353
_LABEL_COMPONENT = f"{envs.GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX}/component"
5454

55+
x = 1
56+
5557

5658
class KubernetesWorkloadServiceType(str, Enum):
5759
"""
@@ -921,6 +923,13 @@ def _create_pod(
921923
),
922924
]
923925

926+
# Parameterize volumes
927+
self._append_pod_volumes(
928+
pod,
929+
workload,
930+
ephemeral_filename_mapping,
931+
)
932+
924933
cnt_init, cnt_run = -1, -1
925934
for ci, c in enumerate(workload.containers):
926935
# Annotate container info.
@@ -1064,13 +1073,6 @@ def _create_pod(
10641073
requests=(resources if resources else None),
10651074
)
10661075

1067-
# Parameterize volumes
1068-
self._append_pod_volumes(
1069-
pod,
1070-
workload,
1071-
ephemeral_filename_mapping,
1072-
)
1073-
10741076
# Parameterize mounts
10751077
self._append_container_volume_mounts(
10761078
container,

0 commit comments

Comments
 (0)