Background
This issue in runwasi containerd/runwasi#108 and the approach outlined in https://docs.google.com/document/d/11shgC3l6gplBjWF1VJCWvN_9do51otscAm0hBDGSSAc. Also the changes proposed in #1857
Proposed changes
In kubernetes based environment, the OCI artifacts might be already pre-pulled but the OCI client requires pulling them:
https://github.com/fermyon/spin/blob/362c75d98e3ac2cb1b760b661fbcb18f0eced118/crates/oci/src/loader.rs#L25-L29
It would be nice to have a function similiar to let app = spin_loader::from_file(PathBuf::from("/spin.toml"), Some(working_dir.clone())).await.context("unable to find app file")?;
but for spin.json that OCI artifacts use.
I've prototyped this working with this change used in deislabs/containerd-wasm-shims#164. But there might be better ways to approach it.
Background
This issue in runwasi containerd/runwasi#108 and the approach outlined in https://docs.google.com/document/d/11shgC3l6gplBjWF1VJCWvN_9do51otscAm0hBDGSSAc. Also the changes proposed in #1857
Proposed changes
In kubernetes based environment, the OCI artifacts might be already pre-pulled but the OCI client requires pulling them:
https://github.com/fermyon/spin/blob/362c75d98e3ac2cb1b760b661fbcb18f0eced118/crates/oci/src/loader.rs#L25-L29
It would be nice to have a function similiar to
let app = spin_loader::from_file(PathBuf::from("/spin.toml"), Some(working_dir.clone())).await.context("unable to find app file")?;but for
spin.jsonthat OCI artifacts use.I've prototyped this working with this change used in deislabs/containerd-wasm-shims#164. But there might be better ways to approach it.