-
Notifications
You must be signed in to change notification settings - Fork 66
K8SPG-703: add internal.percona.com/keep-job finalizer for backups
#1134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hors
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pooknull please check tests
| return reconcile.Result{}, nil | ||
| case v2.BackupSucceeded: | ||
| job, err := findBackupJob(ctx, r.Client, pgBackup) | ||
| if err == nil && len(job.Finalizers) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we assert that the specific finalizer we created for this PR, If it is set, and instead we are checking if the job finalizers are not empty? If we decide at some point to have more finalizers for some reason, what would happen to this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
egegunes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to address @gkech's comment
|
@pooknull ping |
commit: d3da6aa |
https://perconadev.atlassian.net/browse/K8SPG-703
DESCRIPTION
Problem:
Backup jobs may be deleted before they are finished (e.g. via
ttlSecondsAfterFinished), causingpg-backupto be stuck in theRunningstate.Solution:
Add
internal.percona.com/keep-jobfinalizer to backup jobs to prevent them from being deleted while they are running. The finalizer should be automatically removed when the backup finishes or fails.CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability