- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for FinishedCondition (0.12 sec)
-
pkg/controller/job/util/utils.go
limitations under the License. */ package util import ( batch "k8s.io/api/batch/v1" v1 "k8s.io/api/core/v1" ) // FinishedCondition returns true if a job is finished as well as the condition type indicating that. // Returns false and no condition type otherwise func FinishedCondition(j *batch.Job) (bool, batch.JobConditionType) { for _, c := range j.Status.Conditions {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 09:27:46 UTC 2024 - 1.5K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
needsFlush = true } // Prepare the final Complete condition to update the job status with after the finalizers are removed. // It is also used in the enactJobFinished function for reporting. jobCtx.finishedCondition = newCondition(batch.JobComplete, v1.ConditionTrue, jobCtx.finishedCondition.Reason, jobCtx.finishedCondition.Message, jm.clock.Now()) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0) -
pkg/controller/job/util/utils_test.go
for name, test := range tests { t.Run(name, func(t *testing.T) { job := &batch.Job{ Status: batch.JobStatus{ Conditions: test.conditions, }, } isJobFinished, conditionType := FinishedCondition(job) if isJobFinished != test.wantJobFinished { if test.wantJobFinished { t.Error("Expected the job to be finished") } else { t.Error("Expected the job to be unfinished") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 09:27:46 UTC 2024 - 4.7K bytes - Viewed (0) -
pkg/controller/cronjob/cronjob_controllerv2.go
// or if our jobs list is newer than our cj status after a relist, or if someone intentionally created // a job that they wanted us to adopt. } else if found && jobutil.IsJobFinished(j) { _, condition := jobutil.FinishedCondition(j) deleteFromActiveList(cronJob, j.ObjectMeta.UID) jm.recorder.Eventf(cronJob, corev1.EventTypeNormal, "SawCompletedJob", "Saw completed job: %s, condition: %v", j.Name, condition) updateStatus = true
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 09 03:34:25 UTC 2024 - 29.2K bytes - Viewed (0) -
pkg/controller/job/job_controller_test.go
job: job, pods: tc.pods, uncounted: newUncountedTerminatedPods(*job.Status.UncountedTerminatedPods), expectedRmFinalizers: tc.expectedRmFinalizers, finishedCondition: tc.finishedCond, } if isIndexedJob(job) { jobCtx.succeededIndexes = parseIndexesFromString(logger, job.Status.CompletedIndexes, int(*job.Spec.Completions))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 15:36:36 UTC 2024 - 229.2K bytes - Viewed (0)