The job informer relied on the number of successful pods to be correct or a failed pod to be present in the job object to checkin at the end of a job. This did not send the event within the expected time durations.
Moreover, whether a checkin is the beginning or end of a job was determined by the type of event handler, which was incorrect, since a job did not necessarily get deleted when it was either completed or failed.
Now:
The function triggered by the event handler looks at the number of active pods, successful pods, and failed pods to determine whether the job just begun, is still in progress, or have ended.
Also, the status of a job after ending is determined by the Conditions slice in the job status struct.
Previously:
The job informer relied on the number of successful pods to be correct or a failed pod to be present in the job object to checkin at the end of a job. This did not send the event within the expected time durations.
Moreover, whether a checkin is the beginning or end of a job was determined by the type of event handler, which was incorrect, since a job did not necessarily get deleted when it was either completed or failed.
Now:
The function triggered by the event handler looks at the number of
active
pods,successful
pods, andfailed
pods to determine whether the job just begun, is still in progress, or have ended.Also, the status of a job after ending is determined by the
Conditions
slice in the job status struct.