-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add support for layer extraction from OCI artifacts with ImageIndex
#1369
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ilya Dmitrichenko <[email protected]>
Signed-off-by: Ilya Dmitrichenko <[email protected]>
Signed-off-by: Ilya Dmitrichenko <[email protected]>
24a26cb
to
df1734a
Compare
// TODO: next API version should probably use artifact media types | ||
// at the top level and make layer selector optional | ||
ArtifactMediaType string `json:"artifactMediaType,omitempty"` |
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.
I don't see this used anywhere in the controller logic, can you explain what's the role of this field? Is this something that's in the latest OCI spec but not implemented by any registry yet?
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.
This is just a quick rebase of a WIP branch that I had from around the time of #1244. I thought I should open a draft PR before it's forgotten. It still needs some tidying for sure. This field looks like an idea I had at the time, I'll refresh my memory and see if this needs implementing or deleting.
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.
I have recapped this. The idea is actaully that media type of artifact index and the layers that it points at are two distinct notions. I should probably try implementing the field in this PR, without flipping API semanitcs until there is more to make a case for API version bump.
The point is that what you want to select primarily is the media type of the OCI index, the type of the blob is a secondary concern, it can be defaulted to a tarball.
30531f4
to
72f92ac
Compare
Signed-off-by: Ilya Dmitrichenko <[email protected]>
72f92ac
to
271b60e
Compare
ImageIndex
This change makes fetching of OCI artifacts compatible with a wider range of images, namely where the top-level object is an index. Once the index is fetched, the media type selector and (optionally) a numeric offset will be applied to determine what blob to use.
Towards #1247.