Update pkg/controller/job/job_controller.go

Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
This commit is contained in:
Harish K 2024-09-10 10:18:53 -07:00 committed by GitHub
parent e45eef1d51
commit d66c9ef286
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -767,6 +767,7 @@ func (jm *Controller) syncJob(ctx context.Context, key string) (rErr error) {
// if job was finished previously, we don't want to redo the termination
if util.IsJobFinished(&job) {
// The job shouldn't be marked as finished until all pod finalizers are removed.
// Cleaning pod finalizers one more time just in case.
jm.cleanupPodFinalizers(&job)
err := jm.podBackoffStore.removeBackoffRecord(key)
if err != nil {