Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Feature: Support OCI artifact pulling #43

@squillace

Description

@squillace

The scenario is this. Right now, partly because we were trying to exercise the containerd shim and partly because there wasn't an oras-rs crate we could use from source our app hosts -- whether spin, slight, or future hosts -- can't give us a .toml because either we alter how the runtimes acquire their configs in order to integrate with k8s -- something that doesn't make a lot of sense. Even if we use volume mounts for the config files, you don't want the operational experience to ship separately. Instead, you want one reference to an immutable config of a host and a module. You want the joy of using the image value of the pod spec to point at "the entire thing that runs correctly" -- which includes more than one artifact.

The way we do that without OCI Artifacts is by building a scratch container and dropping both the module and the config for the runtime into it. That's fine, but we need to build a container in order to not use the container. :-) This is entirely a point-in-time thing, as an older friend used to say. No immediate hurries.

BUT: we do need to have a plan to a) support both this method and the OCI Artifact method (oras) and b) understand what that would mean for the yaml experience. We EITHER need to re-use the image key and take both and just do the right thing (check with oras and if not, use docker) OR we do a hard roll to oras and commit, re-using the image key for artifacts only. Alternatively, we could add an artifact key and have the runtime punt unless it was either/or but not both. (Problem with that scenario is that no one would recognize the artifact key as schema valid. :-( )

In any case, there is prior art we might be able to use. https://docs.rs/oras/latest/oras/struct.Client.html never got finished, but Sajay says he'd love to fund that. BUT... also Jacob LeGrone in the CNAB space did https://crates.io/crates/oras so I'll reach out to see where that codebase is. Seems to be private. But if he is willing, we can bring that up to date pretty rapidly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions