You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users defined prefetch files list, which can be set to --prefetch files when starting the nydus daemon.
Nydus has implemented the addition of the -- prefetch-patterns parameter to the nydusify convert command. With this parameter, we can specify a prefetch list when converting nydus format images and pull files based on this prefetch list when starting a container. However, due to different services based on one image need to access different files, this method is not flexible enough. Here is another idea, users can customize prefetch lists and pull according to the required prefetch files when pulling images.
Requirements
NRI 2.0: Which has been integrated into containerd since v1.7.0-beta.1.
WorkFlow
Create a pod.yaml file. Define the user-defined prefetch list file path in the labels or annotation field.
Pod creation
During the pod creation period, complete the following process.
Start an NRI plugin and subscribe to pod creation event. Note that NRI plugin can only be called from containerd/CRI. So creation a pod using crictl as below.
crictl runp pod.yaml
NRI plugin invokes the RunPodSandbox method to obtain image name and prefetch list file path when monitoring the pod creation command.
NRI plugin sends image name + prefetch list file path as a massage to snapshotter through the specified socket API.
After receiving the massage sent by NRI, the snapshotter will add a handler to parse the message and temporarily store the result as a global variable.
Pull image
When pulling an image, containerd will notify snapshot to start a new daemon. When starting nydusd, obtain the prefetch list file path from the global variable and add it to the -- prefetch files parameter.
After completing the startup of nydusd, identify the corresponding image name when pulling the image, and then pull according to the prefetch list.
The text was updated successfully, but these errors were encountered:
Users defined prefetch files list, which can be set to
--prefetch files
when starting the nydus daemon.Nydus has implemented the addition of the
-- prefetch-patterns
parameter to thenydusify convert
command. With this parameter, we can specify a prefetch list when converting nydus format images and pull files based on this prefetch list when starting a container. However, due to different services based on one image need to access different files, this method is not flexible enough. Here is another idea, users can customize prefetch lists and pull according to the required prefetch files when pulling images.Requirements
WorkFlow
Pod creation
During the pod creation period, complete the following process.
crictl
as below.image name + prefetch list file path
as a massage to snapshotter through the specified socket API.Pull image
When pulling an image, containerd will notify snapshot to start a new daemon. When starting nydusd, obtain the prefetch list file path from the global variable and add it to the -- prefetch files parameter.
After completing the startup of nydusd, identify the corresponding image name when pulling the image, and then pull according to the prefetch list.
The text was updated successfully, but these errors were encountered: