Merge pull request #86142 from raz-bn/add-complete-event

Adding new job completed event
This commit is contained in:
Kubernetes Prow Robot 2019-12-16 23:43:58 -08:00 committed by GitHub
commit 42fe74cd2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -566,6 +566,7 @@ func (jm *JobController) syncJob(key string) (bool, error) {
job.Status.Conditions = append(job.Status.Conditions, newCondition(batch.JobComplete, "", "")) job.Status.Conditions = append(job.Status.Conditions, newCondition(batch.JobComplete, "", ""))
now := metav1.Now() now := metav1.Now()
job.Status.CompletionTime = &now job.Status.CompletionTime = &now
jm.recorder.Event(&job, v1.EventTypeNormal, "Completed", "Job completed")
} }
} }