Skip to content

Commit 7d153ce

Browse files
authored
fix: remove used-by label on workload (#250)
1 parent 84af8f5 commit 7d153ce

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

internal/constants/constants.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const (
1414
Finalizer = Domain + "/" + FinalizerSuffix
1515

1616
LabelKeyOwner = Domain + "/managed-by"
17-
LabelKeyUser = Domain + "/used-by"
1817
LabelKeyClusterOwner = Domain + "/cluster"
1918
LabelKeyNodeClass = Domain + "/node-class"
2019
LabelKeyPodTemplateHash = Domain + "/pod-template-hash"

internal/gpuallocator/gpuallocator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ func (s *GpuAllocator) markGPUDirty(key types.NamespacedName) {
564564
s.dirtyQueue[key] = struct{}{}
565565
}
566566

567-
func (s *GpuAllocator) markGPUDirtyLoced(key types.NamespacedName) {
567+
func (s *GpuAllocator) markGPUDirtyLocked(key types.NamespacedName) {
568568
s.dirtyQueue[key] = struct{}{}
569569
}
570570

@@ -632,7 +632,7 @@ func (s *GpuAllocator) reconcileAllocationState(ctx context.Context) {
632632
if !sameTflops || !sameVRAM {
633633
gpu.Status.Available.Tflops = tflopsCapacityMap[gpuKey]
634634
gpu.Status.Available.Vram = vramCapacityMap[gpuKey]
635-
s.markGPUDirtyLoced(gpuKey)
635+
s.markGPUDirtyLocked(gpuKey)
636636
log.FromContext(ctx).Info("Correcting gpu available resources", "gpu", gpuKey.Name, "tflops", gpu.Status.Available.Tflops.String(), "vram", gpu.Status.Available.Vram.String())
637637
}
638638
}

internal/webhook/v1/pod_webhook.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ func (m *TensorFusionPodMutator) createOrUpdateWorkload(ctx context.Context, pod
213213
},
214214
}
215215

216-
// Add related Deployment's ReplicaSet for frontend to get related client side workload for this TensorFusionWorkload
217-
// TODO: support multiple client workloads using the same TF workload
218-
if len(pod.OwnerReferences) > 0 {
219-
workload.Labels[constants.LabelKeyUser] = pod.OwnerReferences[0].Kind + "_" + pod.OwnerReferences[0].Name
220-
}
221-
222216
if rootOwnerRef != nil {
223217
workload.OwnerReferences = []metav1.OwnerReference{*rootOwnerRef}
224218
}

0 commit comments

Comments
 (0)