diff --git a/internal/webhook/v1/pod_webhook.go b/internal/webhook/v1/pod_webhook.go index 0841f423..b8e127f9 100644 --- a/internal/webhook/v1/pod_webhook.go +++ b/internal/webhook/v1/pod_webhook.go @@ -281,7 +281,7 @@ func (m *TensorFusionPodMutator) createOrUpdateWorkload( } func (m *TensorFusionPodMutator) patchTFClient( - ctx context.Context, + _ctx context.Context, pod *corev1.Pod, pool *tfv1.GPUPool, isLocalGPU bool, @@ -302,8 +302,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] @@ -341,8 +341,9 @@ func (m *TensorFusionPodMutator) patchTFClient( } // Limit is set to actual index value (1-512) for Device Plugin to match Pod // ResourceFit of dummy device already ignored in TF scheduler - indexQuantity := resource.MustParse(strconv.Itoa(index)) - container.Resources.Limits[constants.PodIndexAnnotation] = indexQuantity + // indexQuantity := resource.MustParse(strconv.Itoa(index)) + // TODO: workaround to avoid kubelet resource check error + container.Resources.Limits[constants.PodIndexAnnotation] = resource.MustParse("1") if !isLocalGPU { addConnectionForRemoteFixedReplicaVirtualGPU(pod, container, clientConfig)