Skip to content

Commit

Permalink
build completed tg
Browse files Browse the repository at this point in the history
Signed-off-by: yuteng <[email protected]>
  • Loading branch information
0yukali0 committed Sep 9, 2024
1 parent 4387f64 commit 7515dd8
Showing 1 changed file with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ func MutateRayJob(parameters string, app *rayv1.RayJob) error {
spec := worker.Template.Spec
name := GenerateTaskGroupName(false, index)
TaskGroups = append(TaskGroups, TaskGroup{
Name: name,
MinMember: *worker.Replicas,
//Labels: meta.Labels,
//Annotations: meta.Annotations,
MinResource: Allocation(spec.Containers),
//NodeSelector: spec.NodeSelector,
//Affinity: spec.Affinity,
//TopologySpreadConstraints: spec.TopologySpreadConstraints,
Name: name,
MinMember: *worker.Replicas,
Labels: meta.Labels,
Annotations: meta.Annotations,
MinResource: Allocation(spec.Containers),
NodeSelector: spec.NodeSelector,
Affinity: spec.Affinity,
TopologySpreadConstraints: spec.TopologySpreadConstraints,
})
meta.Annotations[TaskGroupNameKey] = name
meta.Annotations[AppID] = appID
Expand All @@ -42,21 +42,17 @@ func MutateRayJob(parameters string, app *rayv1.RayJob) error {
v1.ResourceCPU: resource.MustParse("500m"),
v1.ResourceMemory: resource.MustParse("512Mi"),
}
//tmp, _ := json.Marshal(res2)
//meta.Annotations["tmp"] = string(tmp)
//tmp, _ = json.Marshal(Add(res, res2))
//meta.Annotations["Sum"] = string(tmp)
res = Add(res, res2)
}
TaskGroups[0] = TaskGroup{
Name: headName,
MinMember: 1,
//Labels: meta.Labels,
//Annotations: meta.Annotations,
MinResource: res,
//NodeSelector: spec.NodeSelector,
//Affinity: spec.Affinity,
//TopologySpreadConstraints: spec.TopologySpreadConstraints,
Name: headName,
MinMember: 1,
Labels: meta.Labels,
Annotations: meta.Annotations,
MinResource: res,
NodeSelector: spec.NodeSelector,
Affinity: spec.Affinity,
TopologySpreadConstraints: spec.TopologySpreadConstraints,
}
meta.Annotations[TaskGroupNameKey] = headName
info, err := json.Marshal(TaskGroups)
Expand Down

0 comments on commit 7515dd8

Please sign in to comment.