From 28be53ac92a1ec29cca742e10e1eac79637bd904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 31 Mar 2025 11:24:06 +0100 Subject: [PATCH] kata-deploy: Create runtimeclasses by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's make the life of the users easier and create the runtimeclasses for them by default. Signed-off-by: Fabiano FidĂȘncio --- tests/functional/kata-deploy/kata-deploy.bats | 3 --- tests/integration/kubernetes/gha-run.sh | 1 - tools/packaging/kata-deploy/README.md | 6 ++---- .../kata-deploy/helm-chart/kata-deploy/values.yaml | 2 +- .../packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/functional/kata-deploy/kata-deploy.bats b/tests/functional/kata-deploy/kata-deploy.bats index e2735f1f8..6138275f0 100644 --- a/tests/functional/kata-deploy/kata-deploy.bats +++ b/tests/functional/kata-deploy/kata-deploy.bats @@ -40,9 +40,6 @@ setup() { # Set the tested hypervisor as the default `kata` shim export HELM_DEFAULT_SHIM="${KATA_HYPERVISOR}" - # Let the `kata-deploy` script take care of the runtime class creation / removal - export HELM_CREATE_RUNTIME_CLASSES="true" - # Let the `kata-deploy` create the default `kata` runtime class export HELM_CREATE_DEFAULT_RUNTIME_CLASS="true" diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 28f419a67..cbdff162e 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -202,7 +202,6 @@ function deploy_kata() { export HELM_DEBUG="true" export HELM_SHIMS="${KATA_HYPERVISOR}" export HELM_DEFAULT_SHIM="${KATA_HYPERVISOR}" - export HELM_CREATE_RUNTIME_CLASSES="true" export HELM_CREATE_DEFAULT_RUNTIME_CLASS="true" export HELM_ALLOWED_HYPERVISOR_ANNOTATIONS="${ANNOTATIONS}" export HELM_SNAPSHOTTER_HANDLER_MAPPING="${SNAPSHOTTER_HANDLER_MAPPING}" diff --git a/tools/packaging/kata-deploy/README.md b/tools/packaging/kata-deploy/README.md index 11ab7a1af..62f03ba4d 100644 --- a/tools/packaging/kata-deploy/README.md +++ b/tools/packaging/kata-deploy/README.md @@ -102,10 +102,8 @@ Workloads specify the runtime they'd like to utilize by setting the appropriate the `Pod` specification. The `runtimeClass` examples provided define a node selector to match node label `katacontainers.io/kata-runtime:"true"`, which will ensure the workload is only scheduled on a node that has Kata Containers installed -`runtimeClass` is a built-in type in Kubernetes. To apply each Kata Containers `runtimeClass`: -```bash -$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml -``` +`runtimeClass` is a built-in type in Kubernetes, and are created by kata-deploy during the deployment. + The following YAML snippet shows how to specify a workload should use Kata with `Dragonball`: ```yaml 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 fe1a4f94c..bd0085b44 100644 --- a/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml +++ b/tools/packaging/kata-deploy/helm-chart/kata-deploy/values.yaml @@ -9,7 +9,7 @@ env: debug: "false" shims: "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-runtime-rs qemu-se-runtime-rs qemu-sev qemu-snp qemu-tdx stratovirt qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx" defaultShim: "qemu" - createRuntimeClasses: "false" + createRuntimeClasses: "true" createDefaultRuntimeClass: "false" allowedHypervisorAnnotations: "" snapshotterHandlerMapping: "" 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 9225deca3..a5c9ee23d 100644 --- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml @@ -37,7 +37,7 @@ spec: - name: DEFAULT_SHIM value: "qemu" - name: CREATE_RUNTIMECLASSES - value: "false" + value: "true" - name: CREATE_DEFAULT_RUNTIMECLASS value: "false" - name: ALLOWED_HYPERVISOR_ANNOTATIONS