Skip to content
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

Snapshot dedicated pvc #3997

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

dsessler7
Copy link
Contributor

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?

Currently, when the operator creates a VolumeSnapshot, it does it on the cluster's primary pgdata volume with the database running.

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

When snapshots are enabled a dedicated snapshot volume (DSV) will be created and every time a backup completes, a delta restore will be done in the DSV. When the restore finishes successfully, a snapshot will be created of the DSV.

Other Information:

@dsessler7 dsessler7 force-pushed the snapshot-dedicated-pvc branch 2 times, most recently from 3f250c2 to 4799a2f Compare September 24, 2024 00:23
internal/naming/annotations.go Outdated Show resolved Hide resolved
internal/naming/annotations_test.go Outdated Show resolved Hide resolved
// VolumeSnapshots, return an error, otherwise return nil.
volumeSnapshotsExist, err := r.GroupVersionKindExists("snapshot.storage.k8s.io/v1", "VolumeSnapshot")
volumeSnapshotKindExists, err := r.GroupVersionKindExists("snapshot.storage.k8s.io/v1", "VolumeSnapshot")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 I keep forgetting about #3973.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... kind of want to get this PR merged, but maybe after it is merged I can add to the api discovery PR to make snapshots use it and then we can merged that one.

internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
Copy link
Member

@cbandy cbandy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash into fewer commits before merging.

internal/controller/postgrescluster/snapshots.go Outdated Show resolved Hide resolved
…finishes successfully, do a delta restore into dedicated volume and then snapshot the volume.

Add/adjust tests for snapshots.

Co-authored by: Anthony Landreth <tony.landreth@crunchydata.com>
@dsessler7 dsessler7 force-pushed the snapshot-dedicated-pvc branch from 5d39aed to 151cba9 Compare October 3, 2024 07:41
@dsessler7 dsessler7 merged commit 000e6af into CrunchyData:master Oct 3, 2024
15 of 16 checks passed
@dsessler7 dsessler7 deleted the snapshot-dedicated-pvc branch October 3, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants