diff --git a/tools/packaging/kata-deploy/helm-chart/README.md b/tools/packaging/kata-deploy/helm-chart/README.md index 9651004023..ef9ee4ec9e 100644 --- a/tools/packaging/kata-deploy/helm-chart/README.md +++ b/tools/packaging/kata-deploy/helm-chart/README.md @@ -127,7 +127,7 @@ All values can be overridden with --set key=value or a custom `-f myvalues.yaml` | `k8sDistribution` | Set the k8s distribution to use: `k8s`, `k0s`, `k3s`, `rke2`, `microk8s` | `k8s` | | `nodeSelector` | Node labels for pod assignment. Allows restricting deployment to specific nodes | `{}` | | `env.debug` | Enable debugging in the `configuration.toml` | `false` | -| `env.shims` | List of shims to deploy | `clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx` | +| `env.shims` | List of shims to deploy | `clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-runtime-rs-coco-dev qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx` | | `env.defaultShim` | The default shim to use if none specified | `qemu` | | `env.createRuntimeClasses` | Create the k8s `runtimeClasses` | `true` | | `env.createDefaultRuntimeClass` | Create the default k8s `runtimeClass` | `false` | diff --git a/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml b/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml index 71a3495c80..b1989344ed 100644 --- a/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml +++ b/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml @@ -13,7 +13,7 @@ k8sDistribution: "k8s" nodeSelector: {} env: debug: "false" - shims: "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx" + shims: "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-runtime-rs-coco-dev qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx" defaultShim: "qemu" createRuntimeClasses: "true" createDefaultRuntimeClass: "false" diff --git a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml index 20fec5a95b..f2ee4177bb 100644 --- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml @@ -33,7 +33,7 @@ spec: - name: DEBUG value: "false" - name: SHIMS - value: "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx" + value: "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-runtime-rs-coco-dev qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx" - name: DEFAULT_SHIM value: "qemu" - name: CREATE_RUNTIMECLASSES diff --git a/tools/packaging/kata-deploy/runtimeclasses/kata-qemu-runtime-rs-coco-dev.yaml b/tools/packaging/kata-deploy/runtimeclasses/kata-qemu-runtime-rs-coco-dev.yaml new file mode 100644 index 0000000000..c9cf9f97f0 --- /dev/null +++ b/tools/packaging/kata-deploy/runtimeclasses/kata-qemu-runtime-rs-coco-dev.yaml @@ -0,0 +1,13 @@ +--- +kind: RuntimeClass +apiVersion: node.k8s.io/v1 +metadata: + name: kata-qemu-runtime-rs-coco-dev +handler: kata-qemu-runtime-rs-coco-dev +overhead: + podFixed: + memory: "160Mi" + cpu: "250m" +scheduling: + nodeSelector: + katacontainers.io/kata-runtime: "true" diff --git a/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml b/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml index c2c7c90cf8..8c0f81e3fc 100644 --- a/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml +++ b/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml @@ -131,6 +131,19 @@ scheduling: --- kind: RuntimeClass apiVersion: node.k8s.io/v1 +metadata: + name: kata-qemu-runtime-rs-coco-dev +handler: kata-qemu-runtime-rs-coco-dev +overhead: + podFixed: + memory: "160Mi" + cpu: "250m" +scheduling: + nodeSelector: + katacontainers.io/kata-runtime: "true" +--- +kind: RuntimeClass +apiVersion: node.k8s.io/v1 metadata: name: kata-qemu-se handler: kata-qemu-se diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index 745e2f6740..c7042288d5 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -35,7 +35,7 @@ info() { DEBUG="${DEBUG:-"false"}" -SHIMS="${SHIMS:-"clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx"}" +SHIMS="${SHIMS:-"clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-runtime-rs-coco-dev qemu-se-runtime-rs qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx"}" IFS=' ' read -a shims <<< "$SHIMS" DEFAULT_SHIM="${DEFAULT_SHIM:-"qemu"}" default_shim="$DEFAULT_SHIM" @@ -216,7 +216,7 @@ function is_containerd_capable_of_using_drop_in_files() { echo "false" return fi - + local version_major=$(kubectl get node $NODE_NAME -o jsonpath='{.status.nodeInfo.containerRuntimeVersion}' | grep -oE '[0-9]+\.[0-9]+' | cut -d'.' -f1) if [ $version_major -lt 2 ]; then # Only containerd 2.0 does the merge of the plugins section from different snippets, @@ -261,7 +261,7 @@ function get_kata_containers_config_path() { # Map the runtime shim name to the appropriate configuration # file directory. case "$shim" in - cloud-hypervisor | dragonball | qemu-runtime-rs | qemu-se-runtime-rs) config_path="$rust_config_path" ;; + cloud-hypervisor | dragonball | qemu-runtime-rs | qemu-runtime-rs-coco-dev | qemu-se-runtime-rs) config_path="$rust_config_path" ;; *) config_path="$golang_config_path" ;; esac @@ -273,7 +273,7 @@ function get_kata_containers_runtime_path() { local runtime_path case "$shim" in - cloud-hypervisor | dragonball | qemu-runtime-rs | qemu-se-runtime-rs) + cloud-hypervisor | dragonball | qemu-runtime-rs | qemu-runtime-rs-coco-dev | qemu-se-runtime-rs) runtime_path="${dest_dir}/runtime-rs/bin/containerd-shim-kata-v2" ;; *)