- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for appendDuplicatedIndexPodsForRemoval (0.49 sec)
-
pkg/controller/job/indexed_job_utils.go
result := sets.New[int]() for _, p := range pods { ix := getCompletionIndex(p.Annotations) if ix != unknownCompletionIndex { result.Insert(ix) } } return result } // appendDuplicatedIndexPodsForRemoval scans active `pods` for duplicated // completion indexes. For each index, it selects n-1 pods for removal, where n // is the number of repetitions. The pods to be removed are appended to `rm`,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 21 00:44:53 UTC 2023 - 17.5K bytes - Viewed (0) -
pkg/controller/job/indexed_job_utils_test.go
{"1", v1.PodRunning}, }, completions: 6, }, } for name, tc := range cases { t.Run(name, func(t *testing.T) { pods := hollowPodsWithIndexPhase(tc.pods) rm, left := appendDuplicatedIndexPodsForRemoval(nil, nil, pods, int(tc.completions)) rmInt := toIndexPhases(rm) leftInt := toIndexPhases(left) if diff := cmp.Diff(tc.wantRm, rmInt); diff != "" {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 27.9K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
var rm, left []*v1.Pod if isIndexedJob(job) { rm = make([]*v1.Pod, 0, rmAtLeast) left = make([]*v1.Pod, 0, len(pods)-rmAtLeast) rm, left = appendDuplicatedIndexPodsForRemoval(rm, left, pods, int(*job.Spec.Completions)) } else { left = pods } if len(rm) < rmAtLeast { sort.Sort(controller.ActivePods(left)) rm = append(rm, left[:rmAtLeast-len(rm)]...)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0)