Motivation
OCM v2 (ocm2 CLI 0.12, bindings ocm.software/open-component-model/bindings/go/*) changes both the on-registry layout of transferred components and the Go API surface. Solar consumes OCM in multiple places, so a migration cannot be done in isolation. Before committing to it, we need to know what breaks and which transfer layout we standardise on.
Ilja did some experimentation on the v2 transfer format here: https://gitlab.opendefense.cloud/odc/oscp/notes/-/blob/main/ocmv2/transfer.md?ref_type=heads
The three key v2 differences:
- Default transfer is localBlob. All OCI images of a component land inside one multi-manifest OCI artifact under /component-descriptors/. The resource access becomes LocalBlob/v1 with a localReference digest; the pullable reference must be assembled as /component-descriptors/:@. Images lose their identity, nothing in a Kubernetes manifest says "podinfo" any more.
- --upload-as ociArtifact restores ociArtifact/v1 accesses with readable image references. But flat in the target repo (/stefanprodan/podinfo:6.9.1), i.e. exactly the ocm-kit v1-without-mapping behaviour we explicitly did not want, with collision potential across components.
- Layout is only controllable via a transfer spec. ocm2 transfer cv --dry-run -o yaml … > spec.yaml, edit transformations[*].spec.targetResource.access.imageReference, then ocm2 transfer cv --copy-resources --transfer-spec spec1.yaml. Verified to produce //stefanprodan/podinfo:6.9.1
Questions this spike must answer
- Can the target layout be driven programmatically? a mapping rule / plugin hand-editing a generated spec.yaml per component? If not, what is the minimum tooling we would have to own?
- Which layout do we standardise on: localBlob (self-contained, opaque images), ociArtifact + transfer spec (readable, namespaced), or both depending on target?
ACs
Motivation
OCM v2 (ocm2 CLI 0.12, bindings ocm.software/open-component-model/bindings/go/*) changes both the on-registry layout of transferred components and the Go API surface. Solar consumes OCM in multiple places, so a migration cannot be done in isolation. Before committing to it, we need to know what breaks and which transfer layout we standardise on.
Ilja did some experimentation on the v2 transfer format here: https://gitlab.opendefense.cloud/odc/oscp/notes/-/blob/main/ocmv2/transfer.md?ref_type=heads
The three key v2 differences:
Questions this spike must answer
ACs