To simplify, I have a job with code (using GoLang) as:
DO_SOMETHING_A
propagation := metav1.DeletePropagationForeground
deleteOptions := &metav1.DeleteOptions{
PropagationPolicy: &propagation,
}
BatchV1().Jobs(namespace).Delete(name, deleteOptions)
DO_SOMETHING_B
And I didn't add a GracePeriodSeconds
value for the deleteOptions
. However, I still can see the DO_SOMETHING_B
has been executed after the job kills itself by using the BatchV1().Jobs(namespace).Delete(name, deleteOptions)
API call.
What's the reason behind this?