node-installer: run nydus snapshotter on bare metal platforms #798
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Run the nydus-snapshotter on all bare-metal platforms. This snapshotter is used to implement the Kata image guest-pull workflow, where the image is pulled directly inside the CVM. The snapshotter on the host will add the require information to requests the shim will then send to the agent. The agent will use image-rs to pull the image from a registry.
The snapshotter currently requires setting a config options of the containerd plugin. As the table header of this option is part of the k3s/RKE base template, we need to disable the templating to not add the header twice to the document. Opposed to what is written in the k3s docs, it isn't possible to just delete the template and write the config itself, so we copy the content of the rendered config into the template and modify the template onward.
The piece missing in this PR is the installation of
nydus-overlayfs
on the host. This is a mount helper used to create a snapshot on the host while maintaining the custom mount labels that should be delivered to the kata-agent. It is difficult to version as it isn't possible to call it by path, and it's name is relied upon in the agent. It will be installed as part of a followup PR (present on our TDX dev machine for testing purpose).