Wrapper for pulling a container image with a custom proxy config (e.g. for unified storage).
(
repo: &ostree::Repo,
imgref: &ostree_container::OstreeImageReference,
config: ostree_ext::containers_image_proxy::ImageProxyConfig,
booted_deployment: Option<&ostree::Deployment>,
)
| 155 | |
| 156 | /// Wrapper for pulling a container image with a custom proxy config (e.g. for unified storage). |
| 157 | pub(crate) async fn new_importer_with_config( |
| 158 | repo: &ostree::Repo, |
| 159 | imgref: &ostree_container::OstreeImageReference, |
| 160 | config: ostree_ext::containers_image_proxy::ImageProxyConfig, |
| 161 | booted_deployment: Option<&ostree::Deployment>, |
| 162 | ) -> Result<ostree_container::store::ImageImporter> { |
| 163 | let mut imp = ostree_container::store::ImageImporter::new(repo, imgref, config).await?; |
| 164 | imp.require_bootable(); |
| 165 | // We do our own GC/prune in deploy::prune(), so skip the importer's internal one. |
| 166 | imp.disable_gc(); |
| 167 | if let Some(deployment) = booted_deployment { |
| 168 | imp.set_sepolicy_commit(deployment.csum().to_string()); |
| 169 | } |
| 170 | Ok(imp) |
| 171 | } |
| 172 | |
| 173 | pub(crate) fn check_bootc_label(config: &ostree_ext::oci_spec::image::ImageConfiguration) { |
| 174 | if let Some(label) = |
no test coverage detected