diff --git a/internal/webhook/v1/pod_webhook.go b/internal/webhook/v1/pod_webhook.go index 5d73f0e6..b8a7809d 100644 --- a/internal/webhook/v1/pod_webhook.go +++ b/internal/webhook/v1/pod_webhook.go @@ -29,7 +29,6 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/strategicpatch" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -294,8 +293,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] @@ -332,7 +331,7 @@ func (m *TensorFusionPodMutator) patchTFClient( container.Resources.Limits = make(corev1.ResourceList) } // Limit is set to actual index value (1-512) for Device Plugin to match Pod - container.Resources.Limits[constants.PodIndexAnnotation] = resource.MustParse(strconv.Itoa(index)) + // container.Resources.Limits[constants.PodIndexAnnotation] = resource.MustParse(strconv.Itoa(index)) if !isLocalGPU { addConnectionForRemoteFixedReplicaVirtualGPU(pod, container, clientConfig)