-
Notifications
You must be signed in to change notification settings - Fork 611
Optional backups v2 #3977
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
Optional backups v2 #3977
Conversation
@@ -2915,3 +3007,92 @@ func (r *Reconciler) reconcilePGBackRestCronJob( | |||
} | |||
return err | |||
} | |||
|
|||
// BackupsEnabled checks the state of the backups (i.e., if backups are in the spec, | |||
// if a repo-host StatefulSet exists, if the annotation permitting backup deletion exist) |
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.
// if a repo-host StatefulSet exists, if the annotation permitting backup deletion exist) | |
// if a repo-host StatefulSet exists, if the annotation permitting backup deletion exists) |
@@ -382,6 +439,24 @@ func unstructuredToRepoResources(kind string, repoResources *RepoResources, | |||
uList *unstructured.UnstructuredList) error { | |||
|
|||
switch kind { |
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.
There's several changes here because I reordered these cases to match the order of the list where we get these items (in getPGBackRestResources
).
@@ -343,6 +394,12 @@ func (r *Reconciler) cleanupRepoResources(ctx context.Context, | |||
ownedNoDelete = append(ownedNoDelete, owned) | |||
delete = false | |||
} | |||
case hasLabel(naming.LabelPGBackRest): |
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.
Adding this to take care of RBAC and other items not caught by the previous cases.
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
Backups are required
What is the new behavior (if this is a feature change)?
Backups are optional
Other Information:
Issues: [PGO-1529]