Add support for layer extraction from OCI artifacts with ImageIndex#1369
Add support for layer extraction from OCI artifacts with ImageIndex#1369errordeveloper wants to merge 4 commits intofluxcd:mainfrom
ImageIndex#1369Conversation
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
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.
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.
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.
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
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.