source-controller icon indicating copy to clipboard operation
source-controller copied to clipboard

Enhance OCI Artifact support

Open errordeveloper opened this issue 2 years ago • 9 comments

There is limited support for OCI artifacts that hadn't been built with Flux CLI.

One can use spec.layerSelector.mediaType, however it doesn't handle searching images with an index. There is also spec.layerSelector.operation that can be set to copy or extract.

There are also some non-configurable assumptions:

  • it's only possible to select either just the first layer or the first one that matches the given media type
  • spec.layerSelector.operation: copy writes files with .tgz extension, layer content be any kind of format, e.g. JSON

Proposal:

  • allow serach from index, with support for nested indecies also
  • change ops constant names to Copy and Extract to match Kubernetes style
  • provide some way of setting name of the destination files for Copy, by default it could be derrived from the media type name, e.g. tar+gz vs json+gz
  • allow specifying layer offset with default being 0
  • allow exacting multiple layers, perhaps this could be accomplished with operation: MergeDir and operation: LayerPerDir

Some of these changes may be more complex than others, just opening this for a discussion.

errordeveloper avatar Sep 29 '23 11:09 errordeveloper