Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for JobComplete (0.16 sec)

  1. pkg/controller/job/util/utils_test.go

    			conditions: []batch.JobCondition{
    				{
    					Type:   batch.JobComplete,
    					Status: v1.ConditionTrue,
    				},
    			},
    			wantJobFinished:   true,
    			wantConditionType: batch.JobComplete,
    		},
    		"Job is completed and condition is false": {
    			conditions: []batch.JobCondition{
    				{
    					Type:   batch.JobComplete,
    					Status: v1.ConditionFalse,
    				},
    			},
    			wantJobFinished:   false,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 09:27:46 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. pkg/registry/batch/job/strategy_test.go

    						{
    							Type:   batch.JobComplete,
    							Status: api.ConditionTrue,
    						},
    					},
    				},
    			},
    			newJob: &batch.Job{
    				ObjectMeta: validObjectMeta,
    				Status: batch.JobStatus{
    					CompletionTime: nil,
    					StartTime:      &now,
    					Conditions: []batch.JobCondition{
    						{
    							Type:   batch.JobComplete,
    							Status: api.ConditionTrue,
    						},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 101.5K bytes
    - Viewed (0)
  3. pkg/controller/job/util/utils.go

    // Returns false and no condition type otherwise
    func FinishedCondition(j *batch.Job) (bool, batch.JobConditionType) {
    	for _, c := range j.Status.Conditions {
    		if (c.Type == batch.JobComplete || c.Type == batch.JobFailed) && c.Status == v1.ConditionTrue {
    			return true, c.Type
    		}
    	}
    	return false, ""
    }
    
    // IsJobFinished checks whether the given Job has finished execution.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 09:27:46 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/phases/upgrade/health.go

    			return false, nil
    		}
    		for _, cond := range job.Status.Conditions {
    			if cond.Type == batchv1.JobComplete {
    				return true, nil
    			}
    		}
    		lastError = errors.Errorf("no condition of type %v", batchv1.JobComplete)
    		klog.V(2).Infof("Job %q in the namespace %q is not yet complete, retrying", jobName, ns)
    		return false, nil
    	})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 09:18:02 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  5. pkg/controller/ttlafterfinished/ttlafterfinished_controller_test.go

    				},
    				Spec: corev1.PodSpec{
    					Containers: []corev1.Container{
    						{Image: "foo/bar"},
    					},
    				},
    			},
    		},
    	}
    
    	if !completionTime.IsZero() {
    		c := batchv1.JobCondition{Type: batchv1.JobComplete, Status: corev1.ConditionTrue, LastTransitionTime: completionTime}
    		j.Status.Conditions = append(j.Status.Conditions, c)
    	}
    
    	if !failedTime.IsZero() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 18 18:46:26 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  6. pkg/controller/job/job_controller_test.go

    	active    int
    	succeed   int
    	failed    int
    	startTime *time.Time
    }
    
    func TestControllerSyncJob(t *testing.T) {
    	_, ctx := ktesting.NewTestContext(t)
    	jobConditionComplete := batch.JobComplete
    	jobConditionFailed := batch.JobFailed
    	jobConditionSuspended := batch.JobSuspended
    	referenceTime := time.Now()
    
    	testCases := map[string]struct {
    		// job setup
    		parallelism          int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
  7. pkg/controller/ttlafterfinished/ttlafterfinished_controller.go

    // jobFinishTime takes an already finished Job and returns the time it finishes.
    func jobFinishTime(finishedJob *batch.Job) (metav1.Time, error) {
    	for _, c := range finishedJob.Status.Conditions {
    		if (c.Type == batch.JobComplete || c.Type == batch.JobFailed) && c.Status == v1.ConditionTrue {
    			finishAt := c.LastTransitionTime
    			if finishAt.IsZero() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 23:59:28 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. pkg/apis/batch/types.go

    type JobConditionType string
    
    // These are valid conditions of a job.
    const (
    	// JobSuspended means the job has been suspended.
    	JobSuspended JobConditionType = "Suspended"
    	// JobComplete means the job has completed its execution.
    	JobComplete JobConditionType = "Complete"
    	// JobFailed means the job has failed its execution.
    	JobFailed JobConditionType = "Failed"
    	// FailureTarget means the job is about to fail its execution.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 12:01:28 UTC 2024
    - 33K bytes
    - Viewed (0)
  9. pkg/apis/batch/validation/validation.go

    func IsJobFinished(job *batch.Job) bool {
    	for _, c := range job.Status.Conditions {
    		if (c.Type == batch.JobComplete || c.Type == batch.JobFailed) && c.Status == api.ConditionTrue {
    			return true
    		}
    	}
    	return false
    }
    
    func IsJobComplete(job *batch.Job) bool {
    	return IsConditionTrue(job.Status.Conditions, batch.JobComplete)
    }
    
    func IsJobFailed(job *batch.Job) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 16:43:24 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/batch/v1/types.go

    type JobConditionType string
    
    // These are built-in conditions of a job.
    const (
    	// JobSuspended means the job has been suspended.
    	JobSuspended JobConditionType = "Suspended"
    	// JobComplete means the job has completed its execution.
    	JobComplete JobConditionType = "Complete"
    	// JobFailed means the job has failed its execution.
    	JobFailed JobConditionType = "Failed"
    	// FailureTarget means the job is about to fail its execution.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 18:37:07 UTC 2024
    - 40.6K bytes
    - Viewed (0)
Back to top