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

Opencontainers (OCI) Distribution support - PATCH API #10813

Closed
vsoch opened this issue Nov 3, 2020 · 3 comments
Closed

Opencontainers (OCI) Distribution support - PATCH API #10813

vsoch opened this issue Nov 3, 2020 · 3 comments
Assignees

Comments

@vsoch
Copy link

vsoch commented Nov 3, 2020

Is your feature request related to a problem? Please describe.
Hi there! I'm looking to use Minio to implement an OCI distribution specification compliant registry. You can see the details for blob push and pull here - basically it works similar to the s3 multipart upload, but instead of sending a number of parts/upload id, the client gets an upload location and then starts sending chunks either via PATCH or the entire thing with a PUT request. To be more specific, OCI compliant clients will follow this pattern, and then the registry should support the operations.

So my thinking was that I could wrap the standard functions to request a multipart upload and then send back a URL to post / patch to, and ideally this would already be a Minio URL ready to receive it. But I'm not sure this fits within the minio design that expects particular headers, and content. It could be that the registry server parses the request first and forwards it along, but this places a burden on the server to still receive and forward the request. bodies.

Describe the solution you'd like
So I think I'm asking - could you take a look at the spec and suggest a route to take? I'd really like to include Minio as a storage backend so I'm hoping we can think of something reasonable! It could be that there is a different function to prepare a request that is expected to be OCI compliant, for either PATCH or PUT, and then it gets closed. I'm not sure what it would take for minio to be OCI compliant, but it would be hugely beneficial to the general container community. I'm definitely open to ideas and development that might be needed.

Describe alternatives you've considered
As stated above, I could have the server basically parse and forward the request, but I don't think this scales super well. I'd like the registry server to be in charge of creating requests (and associated repos, blobs) but not needing to handle all the binary data.

Additional context
I can help if I'm able!

@harshavardhana
Copy link
Member

So I think I'm asking - could you take a look at the spec and suggest a route to take? I'd really like to include Minio as a storage backend so I'm hoping we can think of something reasonable! It could be that there is a different function to prepare a request that is expected to be OCI compliant, for either PATCH or PUT, and then it gets closed. I'm not sure what it would take for minio to be OCI compliant, but it would be hugely beneficial to the general container community. I'm definitely open to ideas and development that might be needed.

There is no PATCH API in S3 spec its either PUT or POST @vsoch so not sure what MinIO can do here.

@vsoch
Copy link
Author

vsoch commented Nov 19, 2020

@harshavardhana yeah, this is what I suspected. I think what I'll try is implementing the PUT/POST option (and disabling chunked with PATCH). I likely won't get back to working on this for a bit, and you've answered my question, so please feel free to close the issue, unless you think it would be beneficial for others to possibly see and weigh in on.

@harshavardhana
Copy link
Member

@harshavardhana yeah, this is what I suspected. I think what I'll try is implementing the PUT/POST option (and disabling chunked with PATCH). I likely won't get back to working on this for a bit, and you've answered my question, so please feel free to close the issue, unless you think it would be beneficial for others to possibly see and weigh in on.

Thanks @vsoch will close this for now.

@harshavardhana harshavardhana changed the title Opencontainers (OCI) Distribution support Opencontainers (OCI) Distribution support - PATCH API Nov 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants