-
Notifications
You must be signed in to change notification settings - Fork 236
Add S3 backend support to Nydusify Commit #1775
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
base: master
Are you sure you want to change the base?
Add S3 backend support to Nydusify Commit #1775
Conversation
b768d30 to
a70f3ec
Compare
|
@jackowfish Great work, Please tidy up the commit message and sign it so that it can pass the DCO check. |
| if err := targetRemoter.Push(ctx, blobDesc, true, reader); err != nil { | ||
| return nil, errors.Wrap(err, "push blob with HTTP") | ||
| // Push to backend storage if configured, otherwise use registry | ||
| if blobBackend != nil { |
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.
It seems the previous interface definition enforcing the use of paths wasn't very reasonable, which led to this workaround. It caused an extra disk write, resulting in additional overhead. Perhaps in the future, we could consider revising this backend's Upload interface to accept a reader instead.
Others LGTM! |
| config.RootFS.DiffIDs = append(config.RootFS.DiffIDs, mountBlob.Desc.Digest) | ||
|
|
||
| // When using S3 backend, skip adding new blob DiffIDs since they won't be in manifest | ||
| if opt.BackendType != "s3" { |
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.
May be if opt.BackendType != "registry" {.
|
|
||
| // When using S3 backend, skip adding new blobs to manifest since they're referenced via URLs | ||
| // and Nydus only needs the bootstrap layer to function | ||
| if opt.BackendType != "s3" { |
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.
Ditto.
| lowerDirs = strings.TrimPrefix(mount[0].Options[2], "lowerdir=") | ||
| upperDir = strings.TrimPrefix(mount[0].Options[1], "upperdir=") | ||
|
|
||
| // Parse overlay mount options properly - they can be in any order |
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.
Nice work.
Signed-off-by: Jack Decker <[email protected]>
a70f3ec to
1df0a91
Compare
Signed-off-by: Jack Decker <[email protected]>
49c72b6 to
ba1a626
Compare
Signed-off-by: Jack Decker <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1775 +/- ##
==========================================
- Coverage 54.78% 54.74% -0.04%
==========================================
Files 199 199
Lines 54197 54274 +77
Branches 44727 44727
==========================================
+ Hits 29692 29714 +22
- Misses 23016 23071 +55
Partials 1489 1489
🚀 New features to boost your workflow:
|
Overview
Adding S3 backend support to nydusify commit
Related Issues
Change Details
Added S3 Backend support - similarly to how it's implemented for
nydusify convert- needed the ability to upload these commits directly to blob storage, so re-used most of the of the implementation from there.Test Results
Have tested via nerdctl to s3 and Cloudflare R2 - working as expected.
Change Type
Please select the type of change your pull request relates to:
Self-Checklist
Before submitting a pull request, please ensure you have completed the following: