Created
March 8, 2019 10:22
-
-
Save d-kuro/5f2320f6828c9225a5d4707e2737de43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from: https://github.com/kubernetes/kubernetes/blob/87f9429087d4e31201412548517d36e83abebc8d/pkg/controller/cronjob/cronjob_controller.go#L220-L228 | |
// Remove any job reference from the active list if the corresponding job does not exist any more. | |
// Otherwise, the cronjob may be stuck in active mode forever even though there is no matching | |
// job running. | |
for _, j := range sj.Status.Active { | |
if found := childrenJobs[j.UID]; !found { | |
recorder.Eventf(sj, v1.EventTypeNormal, "MissingJob", "Active job went missing: %v", j.Name) | |
deleteFromActiveList(sj, j.UID) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment