Skip to content

Commit 28c9e49

Browse files
committed
remove duplicate code of add task spec annotation
Signed-off-by: lowang-bh <[email protected]>
1 parent 7383114 commit 28c9e49

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

pkg/controller.v1/mpi/mpijob_controller.go

-6
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,6 @@ func (jc *MPIJobReconciler) newWorker(mpiJob *kubeflowv1.MPIJob, name string) *c
10241024

10251025
rtWorker := strings.ToLower(string(kubeflowv1.MPIJobReplicaTypeWorker))
10261026
jc.PodGroupControl.DecoratePodTemplateSpec(podSpec, mpiJob, rtWorker)
1027-
if jc.PodGroupControl.GetSchedulerName() == "volcano" {
1028-
podSpec.Annotations[volcanoTaskSpecKey] = rtWorker
1029-
}
10301027
}
10311028

10321029
return &corev1.Pod{
@@ -1076,9 +1073,6 @@ func (jc *MPIJobReconciler) newLauncher(mpiJob *kubeflowv1.MPIJob, kubectlDelive
10761073

10771074
rt := strings.ToLower(string(kubeflowv1.MPIJobReplicaTypeLauncher))
10781075
jc.PodGroupControl.DecoratePodTemplateSpec(podSpec, mpiJob, rt)
1079-
if jc.PodGroupControl.GetSchedulerName() == "volcano" {
1080-
podSpec.Annotations[volcanoTaskSpecKey] = rt
1081-
}
10821076
}
10831077

10841078
podSpec.Spec.ServiceAccountName = launcherName

pkg/controller.v1/tensorflow/tfjob_controller.go

-3
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,6 @@ func (r *TFJobReconciler) createNewPod(tfjob *kubeflowv1.TFJob, rt, index string
900900
}
901901

902902
r.PodGroupControl.DecoratePodTemplateSpec(podTemplate, tfjob, rt)
903-
if gangSchedulerName == "volcano" {
904-
podTemplate.Annotations[volcanoTaskSpecKey] = rt
905-
}
906903
}
907904

908905
err = r.PodControl.CreatePodsWithControllerRef(tfjob.Namespace, podTemplate, tfjob, controllerRef)

0 commit comments

Comments
 (0)