From 6bfd9b1beb6be9016d0776e1af94e3ffa6921836 Mon Sep 17 00:00:00 2001 From: Joey <569475269@qq.com> Date: Thu, 27 Nov 2025 10:03:08 +0800 Subject: [PATCH] fix: dummy device index issue --- internal/webhook/v1/pod_webhook.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/webhook/v1/pod_webhook.go b/internal/webhook/v1/pod_webhook.go index 150c71a6..7cbc6c99 100644 --- a/internal/webhook/v1/pod_webhook.go +++ b/internal/webhook/v1/pod_webhook.go @@ -273,7 +273,7 @@ func (m *TensorFusionPodMutator) createOrUpdateWorkload( } func (m *TensorFusionPodMutator) patchTFClient( - _ctx context.Context, + ctx context.Context, pod *corev1.Pod, pool *tfv1.GPUPool, isLocalGPU bool, @@ -294,8 +294,8 @@ func (m *TensorFusionPodMutator) patchTFClient( // Index must be assigned in webhook stage since scheduler cannot modify Pod // This is a special index resource (1-512), not a real device resource // Index is assigned in ascending order (1, 2, 3, ...) via distributed lock (leader election) - // index := m.assignDeviceAllocationIndex(ctx, pod) - // log.FromContext(ctx).Info("assigned device allocation index successfully", "index", index, "pod", pod.Name) + index := m.assignDeviceAllocationIndex(ctx, pod) + log.FromContext(ctx).Info("assigned device allocation index successfully", "index", index, "pod", pod.Name) for _, containerIndex := range containerIndices { container := &pod.Spec.Containers[containerIndex]