-
Notifications
You must be signed in to change notification settings - Fork 49
Description
What would you like to be added:
Currently stereoscope will throw an error when using image providers when they are passed an image index that contains references to multiple manifests. I'd like to request that this behaviour is changed (or a new feature is implemented) to support image indexes with references to multiple manifests.
Why is this needed:
Multi manifest image indexes are becoming increasingly more common, especially with the prominence of multiple supported architectures for containers (primarily amd64
and arm64
). If stereoscope is passed one of these multi manifest indexes, it errors out with no ability to filter or select one of the manifests from the index (at least with the oci-dir
provider).
My primary use-case for this change is to be able to use Syft to generate SBOMs for each manifest within a multi-arch oci-dir
. While I'm unsure exactly how the SBOMs will be generated for multi-arch images, the changes I am requesting here seem to be a prerequisite to be able to support any type of multi-arch SBOM (or generating SBOMs per image manifest) when given a multi-manifest index.
Additional context:
I have already prototyped the code for supporting this and plan to open a PR but thought I would open an issue before doing so. My main concerns about making this change is to what extent is changing or breaking the existing API allowed.
My current implementation adds a new Index
struct, a new IndexProvider
interface with a ProvideIndex
method so providers can optionally add support for multi-manifest indexes, however this feels very awkward for two reasons.
The first is providers will still error out if you call Provide
with a multi-manifest index, this is due to the existing API not being changed at all and Provide
still only supporting a single image.
Secondly, there would now another entire code path to support multi-manifest indexes. While this code path does still fully support single-manifest indexes (or just single images if the format doesn't have the concept of multiple manifests), it does mean users of this library will need to implement support for a different API and new users may be confused about using the Index vs non-index functions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status