1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-09 08:57:25 +00:00

kata-deploy: Create runtimeclasses by default

Let's make the life of the users easier and create the runtimeclasses
for them by default.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio 2025-03-31 11:24:06 +01:00
parent abbc9c6b50
commit 28be53ac92
5 changed files with 4 additions and 10 deletions
tests
functional/kata-deploy
integration/kubernetes
tools/packaging/kata-deploy
README.md
helm-chart/kata-deploy
kata-deploy/base

View File

@ -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"

View File

@ -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}"

View File

@ -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

View File

@ -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: ""

View File

@ -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