-
Notifications
You must be signed in to change notification settings - Fork 74
K8SPG-771: Backup snapshots #1418
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
Changes from all commits
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
5c9506a
wip: add fencing mechanism
mayankshah1607 c021fb2
rename to suspended-instances
mayankshah1607 6043b7a
add BackupSnapshots feature gate
mayankshah1607 93c732b
implement reconciler logic
mayankshah1607 bb96b8a
implement offline executor
mayankshah1607 22cb071
naming improvements
mayankshah1607 478f8d9
add to scheme
mayankshah1607 8bff157
fix reconcile state
mayankshah1607 0c906ea
bug fixes and improvements
mayankshah1607 77a96b6
naming improvements and fixes
mayankshah1607 7f0587f
ran make generate
mayankshah1607 7b33275
fix PGBackup field validations
mayankshah1607 7e412fe
refactors and stability improvements
mayankshah1607 d30df00
update cr.yaml examples
mayankshah1607 ff0059c
Merge branch 'main' into K8SPG-771
mayankshah1607 0e2537c
organize imports
mayankshah1607 1a551b1
misspells
mayankshah1607 d4e09b5
improve fencing logic
mayankshah1607 cdb8f43
add extra validation
mayankshah1607 c53a00a
improvements to suspended logic
mayankshah1607 77bb6a8
finalizer renaming
mayankshah1607 c8a2daa
remove enabled field
mayankshah1607 808fd85
implement snapshot schedules
mayankshah1607 ef509d7
linting
mayankshah1607 2d93ca5
implement in-place restore
mayankshah1607 78032c4
update cr.yaml example
mayankshah1607 bf04199
linting
mayankshah1607 581a629
no need to use configmap to track
mayankshah1607 834d27c
more improvements
mayankshah1607 645cf65
typo
mayankshah1607 e9196e4
wip: PiTR
mayankshah1607 2b4981f
support snapshots in WALWatcher
mayankshah1607 1cbdcab
bug fix
mayankshah1607 f2fdd02
update comments
mayankshah1607 0566dcf
linting
mayankshah1607 85d9783
add PGO_FEATURE_GATES env variable to deploy
mayankshah1607 4f48769
add retry mechanism
mayankshah1607 6e4c7b8
implement checkpointing
mayankshah1607 38857f3
add restore_command wrapper for snapshots
mayankshah1607 aa53460
add logic for creating snapshot signal file
mayankshah1607 bcd5d04
handle leader ep reconcile
mayankshah1607 047b653
more improvements
mayankshah1607 6dd9948
add e2e test
mayankshah1607 e906e4c
wip: fix pitr
mayankshah1607 598038a
in-place restore improvements
mayankshah1607 ecb41dc
update e2e test
mayankshah1607 e0f155f
Merge branch 'main' into K8SPG-771
mayankshah1607 04039f7
update test runs
mayankshah1607 1f58190
test fixes
mayankshah1607 3888409
Update build/postgres-operator/restore_command.sh
mayankshah1607 ba9feef
support for WAL and Tablespace volumes
mayankshah1607 9f9620d
fix tests
mayankshah1607 a48e58a
Merge branch 'main' into K8SPG-771
mayankshah1607 04dcc56
workaround improvements
mayankshah1607 4d0d91b
Merge branch 'main' into K8SPG-771
mayankshah1607 05dd8fc
update examples
mayankshah1607 bdb8cab
fix unit test
mayankshah1607 99bf9e2
remove unused code
mayankshah1607 457231b
add unit test shouldFailSnapshot
mayankshah1607 d25ce94
add unit tests for backup helpers
mayankshah1607 de310a9
linting
mayankshah1607 b523626
cleanup unused code
mayankshah1607 3da1a10
formatting
mayankshah1607 7b12244
code cleanup
mayankshah1607 3f78ad8
status improvements
mayankshah1607 05361f7
add more unit tests
mayankshah1607 c9942f9
update e2e test assertions
mayankshah1607 ab2c612
fix inconsistencies & address copilot comments
mayankshah1607 0e9caea
remove sh prefix
mayankshah1607 54603df
checkpoint timeout default to 5m
mayankshah1607 6679366
linting
mayankshah1607 a99b660
POSIX-compliant script
mayankshah1607 f9294d6
fix potential nil-ptr
mayankshah1607 c7d3340
fix error messag
mayankshah1607 34a95a2
fix invalid status update
mayankshah1607 abd599a
fix retries to get latest objecgt
mayankshah1607 a7fe133
bugfix: restore reconcile can use incorrect volume spec
mayankshah1607 620c3de
add unit test
mayankshah1607 de31ed9
fix linting suggestions
mayankshah1607 21b71da
prepare job should work when using separate wal volumes
mayankshah1607 4fb1ef9
update unit tests
mayankshah1607 de9c305
spelling errors
mayankshah1607 df353e1
allow configuring checkpoint timeout
mayankshah1607 0e8879c
fix restore wrapper
mayankshah1607 26ed3f8
consistent field naming
mayankshah1607 71c5430
fix retry loop
mayankshah1607 1028d23
no need to check PITR while unsuspending
mayankshah1607 5357c50
error message consistency
mayankshah1607 b4910f5
remove duplicate code
mayankshah1607 3d314a2
use fmt.Errorf
mayankshah1607 e20a3cb
catch potential nil error
mayankshah1607 4e2203c
allow skipping checkpointing
mayankshah1607 05386e1
Merge branch 'main' into K8SPG-771
mayankshah1607 df83311
Merge branch 'main' into K8SPG-771
mayankshah1607 685d172
address copilot comments
mayankshah1607 239bba7
Merge branch 'main' into K8SPG-771
mayankshah1607 e7279c9
fix error message
mayankshah1607 216ebbe
Merge branch 'main' into K8SPG-771
mayankshah1607 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # When this marker exists (e.g. after a snapshot restore), skip all WAL recovery by | ||
| # exiting non-zero. Do not remove the file so every restore_command call is skipped. | ||
| if [ -f "${PGDATA}/skip-wal-recovery" ]; then | ||
| exit 1 | ||
| fi | ||
|
|
||
| exec "$@" | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,5 +5,6 @@ metadata: | |
| spec: | ||
| pgCluster: cluster1 | ||
| repoName: repo1 | ||
| # method: volumeSnapshot | ||
| # options: | ||
| # - --type=full | ||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
any reason to do this?
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.
We don't need any bash-specific features in this script, so using
/bin/shis better for portability (even though our images are expected to support bash). Do you think we need bash?