-
Notifications
You must be signed in to change notification settings - Fork 56
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
K8SPG-586: Add delete-backups finalizer #989
base: main
Are you sure you want to change the base?
Conversation
LGFM |
pod := podList.Items[0] | ||
|
||
var stdout, stderr bytes.Buffer | ||
pgBackrestCmd := "pgbackrest --stanza=db --log-level-console=info stop; " + |
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.
should we run the second command if first one fails?
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.
commit: 6f323f5 |
CHANGE DESCRIPTION
Problem:
In our other operators, we have a delete-backup finalizer under backup CR, meaning we can delete the individual backup.
In PG we can’t do that, the only thing we can delete is all the backups from all the repos or backups for a particular repo.
Solution:
Add a
percona.com/delete-backups
finalizer that will ensure that all backups are removed when the cluster is deleted.When the finalizer is applied, the operator will basically issue
pgbackrest --stanza=db stanza-delete
command that will essentially delete all the backups from all the configured repos. Besides removing all the physical backup files, finalizer will also delete all pg-backup objects since there is no reason to leave them dangling around without physical backups that correspond to them.This is not recommended in production.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability