backube / volsync

Asynchronous data replication for Kubernetes volumes
https://volsync.readthedocs.io
GNU Affero General Public License v3.0
601 stars 69 forks source link

feat(restic): support for using an existing pvc as a repository #1427

Open onedr0p opened 1 month ago

onedr0p commented 1 month ago

Describe what this PR does

Support for using an existing pvc as a restic repository, opens up the ability to use NFS backed volumes (and others) to store the backup repository on instead of only using s3

Is there anything that requires special attention?

Related issues:

https://github.com/backube/volsync/issues/319

2 years later.....

Continuation of https://github.com/backube/volsync/pull/321

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: onedr0p Once this PR has been reviewed and has the lgtm label, please assign johnstrunk for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/backube/volsync/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 1 month ago

Hi @onedr0p. Thanks for your PR.

I'm waiting for a backube member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 48.27586% with 15 lines in your changes missing coverage. Please review.

Project coverage is 66.2%. Comparing base (493d997) to head (1fdf146). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
controllers/mover/restic/mover.go 44.4% 13 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1427 +/- ## ======================================= - Coverage 67.5% 66.2% -1.3% ======================================= Files 57 57 Lines 5844 7497 +1653 ======================================= + Hits 3947 4967 +1020 - Misses 1612 2243 +631 - Partials 285 287 +2 ``` | [Files with missing lines](https://app.codecov.io/gh/backube/volsync/pull/1427?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=backube) | Coverage Δ | | |---|---|---| | [controllers/mover/restic/builder.go](https://app.codecov.io/gh/backube/volsync/pull/1427?src=pr&el=tree&filepath=controllers%2Fmover%2Frestic%2Fbuilder.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=backube#diff-Y29udHJvbGxlcnMvbW92ZXIvcmVzdGljL2J1aWxkZXIuZ28=) | `90.5% <100.0%> (-0.8%)` | :arrow_down: | | [controllers/mover/restic/mover.go](https://app.codecov.io/gh/backube/volsync/pull/1427?src=pr&el=tree&filepath=controllers%2Fmover%2Frestic%2Fmover.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=backube#diff-Y29udHJvbGxlcnMvbW92ZXIvcmVzdGljL21vdmVyLmdv) | `79.9% <44.4%> (-2.7%)` | :arrow_down: | ... and [53 files with indirect coverage changes](https://app.codecov.io/gh/backube/volsync/pull/1427/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=backube)
sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

onedr0p commented 1 month ago

@JohnStrunk is this what you had in mind from our discussion from awhile ago in https://github.com/backube/volsync/pull/321?

JohnStrunk commented 2 weeks ago

We haven't forgotten about this one... Things have been busy. We'll take a look when we get a chance.

onedr0p commented 2 weeks ago

No worries, I am actually using a kyverno policy to mutate the job to add this support in the meantime.