mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-02 17:34:18 +00:00
Merge pull request #8400 from littlejawa/fix_pullimage_in_guest_for_crio
CC | agent: fix annotation name to allow cri-o support of CoCo pullimage in guest
This commit is contained in:
@@ -207,7 +207,16 @@ impl ImageService {
|
|||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
info!(sl(), "image metadata: {:?}", image_metadata);
|
info!(sl(), "image metadata: {:?}", image_metadata);
|
||||||
Self::set_proxy_env_vars();
|
Self::set_proxy_env_vars();
|
||||||
if image_metadata["io.kubernetes.cri.container-type"] == "sandbox" {
|
let is_sandbox = if let Some(value) = image_metadata.get("io.kubernetes.cri.container-type")
|
||||||
|
{
|
||||||
|
value == "sandbox"
|
||||||
|
} else if let Some(value) = image_metadata.get("io.kubernetes.cri-o.ContainerType") {
|
||||||
|
value == "sandbox"
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
|
||||||
|
if is_sandbox {
|
||||||
let mount_path = Self::unpack_pause_image(cid, "pause")?;
|
let mount_path = Self::unpack_pause_image(cid, "pause")?;
|
||||||
self.add_image(String::from(image), String::from(cid)).await;
|
self.add_image(String::from(image), String::from(cid)).await;
|
||||||
return Ok(mount_path);
|
return Ok(mount_path);
|
||||||
|
Reference in New Issue
Block a user