-
Notifications
You must be signed in to change notification settings - Fork 4
Introduce PVC based repo-host for pgbackrest #35
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
Merged
Merged
Conversation
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
With this commit a PVC based backup is possible for pgbackrest. This can be done by providing Spec.Backup.Pgbackrest.Repo[i].Storage = "pvc" in the manifest, this will also require to provide Spec.Backup.Pgbackrest.Repo[i].pvcSize = 'xGi'. When this is option is set, a statefulset with 1 instance is created for the repo-host. The required global and db section for the pgbackrest configuration file pgbackrest_instance.conf should be set by the appropriate configmaps for both the postgres pods and the repo-host pod.
Example manifest to test this feature
|
… for RepoHost-Configmap
…updated some labels in e2e
The code was counting all matching pods and then waited for master and replica counts to add up to this. Could be improved by adding a role aux to other pods and wait for them too, but it's not clear that we want to do this.
If backup archive is not available during deletion PostgreSQL shutdown will hang on archiving. Deleting main STS before backup one will ensure proper sequencing because STS deletion waits for pods to be deleted.
Now they only get dropped when backup repositories are deleted or cluster is deleted. Cert syncing and repo host volume resizing still not in here.
* Pass repo spec instead of only name to generation funcs * Rename name parameter to backupType * Generate selector parameter so that it makes use of ClusterLabel using existing functions.. * Remove extra overwrite of selector env * Clean up log spam from cronjob syncing
Restore.repo is the same as repos.name. Restore.options is a map of option: value instead of array of options
When replica is started before leader promotes it fails to rewind and gets stuck.
The feature was conflicting with beign able to pass in secrets for S3 configuration.
Now using additional volumes mechanism as it is intended. Also enables not adding pgbackrest volumes to logical backup jobs.
Schmaetz
approved these changes
May 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this commit a PVC based backup is possible for pgbackrest. This can be done by providing Spec.Backup.Pgbackrest.Repo[i].Storage = "pvc" in the manifest, this will also require to provide Spec.Backup.Pgbackrest.Repo[i].pvcSize = 'xGi'. When this is option is set, a statefulset with 1 instance is created for the repo-host. The required global and db section for the pgbackrest configuration file pgbackrest_instance.conf should be set by the appropriate configmaps for both the postgres pods and the repo-host pod.