Set delete propagation policy to background when removing jobs and its dependents
This commit is contained in:
@@ -118,7 +118,8 @@ func (r realJobControl) CreateJob(namespace string, job *batchv1.Job) (*batchv1.
|
||||
}
|
||||
|
||||
func (r realJobControl) DeleteJob(namespace string, name string) error {
|
||||
return r.KubeClient.BatchV1().Jobs(namespace).Delete(name, nil)
|
||||
background := metav1.DeletePropagationBackground
|
||||
return r.KubeClient.BatchV1().Jobs(namespace).Delete(name, &metav1.DeleteOptions{PropagationPolicy: &background})
|
||||
}
|
||||
|
||||
type fakeJobControl struct {
|
||||
|
Reference in New Issue
Block a user