Cronjob leaves behind pods after jobs are deleted #71772
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
sig/apps
Categorizes an issue or PR as relevant to SIG Apps.
Milestone
What happened:
There seems to be a regression after 1.13 release. A Cronjob with default settings does not clean up completed pods. The job themselves are getting deleted as expected, but the pods are left behind. This seems to be related to #70872 @juanvallejo
What you expected to happen:
Expected the pods for now non-existent child jobs of a cronjob to be cleaned up. This is the way it used to work prior to 1.13/
How to reproduce it (as minimally and precisely as possible):
run
kubectl apply
on this manifest:Wait, more than 3 minutes, observe, that while only 3 successful jobs are present, the pods from now deleted jobs are left behind and never get deleted.
Anything else we need to know?:
@liggitt pointed out the following relevant places in the code base:
https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/batch/job/strategy.go#L53
https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cronjob/injection.go#L121
Environment:
kubectl version
): 1.13.0uname -a
): 4.4.0-135-generic/kind bug
The text was updated successfully, but these errors were encountered: