mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-10 22:12:35 +00:00
kata-deploy: Add qemu-nvidia-gpu-snp-runtime-rs shim
Register the new qemu-nvidia-gpu-snp-runtime-rs shim across the kata-deploy stack so it is built, installed, and exposed as a RuntimeClass. This adds the shim to the Rust binary's RUST_SHIMS list (so it uses the runtime-rs binary), SHIMS list, the qemu-snp-experimental share name mapping, and the x86_64 default shim set. The Helm chart gets the new shim entry in values.yaml, try-kata-nvidia-gpu.values.yaml, and the RuntimeClass overhead definition in runtimeclasses.yaml. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -32,6 +32,7 @@ const ALL_SHIMS: &[&str] = &[
|
||||
"qemu-nvidia-gpu",
|
||||
"qemu-nvidia-gpu-runtime-rs",
|
||||
"qemu-nvidia-gpu-snp",
|
||||
"qemu-nvidia-gpu-snp-runtime-rs",
|
||||
"qemu-nvidia-gpu-tdx",
|
||||
"qemu-runtime-rs",
|
||||
"qemu-se",
|
||||
@@ -666,6 +667,7 @@ fn get_qemu_share_name(shim: &str) -> Option<String> {
|
||||
let share_name = match shim {
|
||||
"qemu-cca" => "qemu-cca-experimental",
|
||||
"qemu-nvidia-gpu-snp" => "qemu-snp-experimental",
|
||||
"qemu-nvidia-gpu-snp-runtime-rs" => "qemu-snp-experimental",
|
||||
"qemu-nvidia-gpu-tdx" => "qemu-tdx-experimental",
|
||||
_ => "qemu",
|
||||
};
|
||||
@@ -1057,8 +1059,9 @@ mod tests {
|
||||
#[case("qemu-cca", "qemu")]
|
||||
#[case("qemu-nvidia-gpu", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-runtime-rs", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-tdx", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-snp", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-snp-runtime-rs", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-tdx", "qemu")]
|
||||
#[case("qemu-runtime-rs", "qemu")]
|
||||
#[case("qemu-coco-dev-runtime-rs", "qemu")]
|
||||
#[case("qemu-se-runtime-rs", "qemu")]
|
||||
|
||||
@@ -718,7 +718,7 @@ fn parse_custom_runtimes() -> Result<Vec<CustomRuntime>> {
|
||||
/// Returns only shims that are supported for that architecture
|
||||
fn get_default_shims_for_arch(arch: &str) -> &'static str {
|
||||
match arch {
|
||||
"x86_64" => "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-coco-dev-runtime-rs qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-runtime-rs qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx qemu-snp qemu-snp-runtime-rs qemu-tdx qemu-tdx-runtime-rs",
|
||||
"x86_64" => "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-coco-dev-runtime-rs qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-runtime-rs qemu-nvidia-gpu-snp qemu-nvidia-gpu-snp-runtime-rs qemu-nvidia-gpu-tdx qemu-snp qemu-snp-runtime-rs qemu-tdx qemu-tdx-runtime-rs",
|
||||
"aarch64" => "clh cloud-hypervisor dragonball fc qemu qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-runtime-rs qemu-cca",
|
||||
"s390x" => "qemu qemu-runtime-rs qemu-se qemu-se-runtime-rs qemu-coco-dev qemu-coco-dev-runtime-rs",
|
||||
"ppc64le" => "qemu",
|
||||
|
||||
@@ -11,6 +11,7 @@ pub const RUST_SHIMS: &[&str] = &[
|
||||
"dragonball",
|
||||
"qemu-runtime-rs",
|
||||
"qemu-nvidia-gpu-runtime-rs",
|
||||
"qemu-nvidia-gpu-snp-runtime-rs",
|
||||
"qemu-coco-dev-runtime-rs",
|
||||
"qemu-se-runtime-rs",
|
||||
"qemu-snp-runtime-rs",
|
||||
|
||||
@@ -99,6 +99,7 @@ scheduling:
|
||||
"qemu-nvidia-gpu" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-runtime-rs" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-snp" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-snp-runtime-rs" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-tdx" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-cca" (dict "memory" "2048Mi" "cpu" "1.0")
|
||||
"stratovirt" (dict "memory" "130Mi" "cpu" "250m")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Example values file to enable NVIDIA GPU shims
|
||||
# This includes all NVIDIA GPU-enabled shims: qemu-nvidia-gpu, qemu-nvidia-gpu-runtime-rs, qemu-nvidia-gpu-snp, qemu-nvidia-gpu-tdx
|
||||
# This includes all NVIDIA GPU-enabled shims: qemu-nvidia-gpu, qemu-nvidia-gpu-runtime-rs, qemu-nvidia-gpu-snp, qemu-nvidia-gpu-snp-runtime-rs, qemu-nvidia-gpu-tdx
|
||||
#
|
||||
# Usage:
|
||||
# helm install kata-deploy oci://ghcr.io/kata-containers/kata-deploy-charts/kata-deploy \
|
||||
@@ -67,6 +67,28 @@ shims:
|
||||
nvidia.com/cc.ready.state: "true"
|
||||
amd.feature.node.kubernetes.io/snp: "true"
|
||||
|
||||
qemu-nvidia-gpu-snp-runtime-rs:
|
||||
enabled: true
|
||||
supportedArches:
|
||||
- amd64
|
||||
allowedHypervisorAnnotations: []
|
||||
containerd:
|
||||
snapshotter: "nydus"
|
||||
forceGuestPull: false
|
||||
crio:
|
||||
guestPull: true
|
||||
agent:
|
||||
httpsProxy: ""
|
||||
noProxy: ""
|
||||
runtimeClass:
|
||||
# These labels are automatically added by gpu-operator and NFD
|
||||
# respectively. Override if you want to use a different label.
|
||||
# If you don't have NFD, you need to add the snp label by other
|
||||
# means to your SNP nodes.
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "true"
|
||||
amd.feature.node.kubernetes.io/snp: "true"
|
||||
|
||||
qemu-nvidia-gpu-tdx:
|
||||
enabled: true
|
||||
supportedArches:
|
||||
|
||||
@@ -182,6 +182,24 @@ shims:
|
||||
nvidia.com/cc.ready.state: "true"
|
||||
amd.feature.node.kubernetes.io/snp: "true"
|
||||
|
||||
qemu-nvidia-gpu-snp-runtime-rs:
|
||||
enabled: ~
|
||||
supportedArches:
|
||||
- amd64
|
||||
allowedHypervisorAnnotations: []
|
||||
containerd:
|
||||
snapshotter: "nydus"
|
||||
forceGuestPull: false
|
||||
crio:
|
||||
guestPull: true
|
||||
agent:
|
||||
httpsProxy: ""
|
||||
noProxy: ""
|
||||
runtimeClass:
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "true"
|
||||
amd.feature.node.kubernetes.io/snp: "true"
|
||||
|
||||
qemu-nvidia-gpu-tdx:
|
||||
enabled: ~
|
||||
supportedArches:
|
||||
|
||||
Reference in New Issue
Block a user