kata-deploy: Allow shim creation based on what's passed to the daemonset

Instead of hardcoding shims as part of the script, let's ensure we can
allow them to be created based on environment variables passed to the
daemonset.

This change brings no functionality change as the default values in the
daemonset are exactly what has been used as part of the scripts.

Fixes: #7407

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-07-25 08:30:00 +02:00
parent 5ce0b4743f
commit a56f96bb2b
3 changed files with 10 additions and 11 deletions

View File

@ -28,6 +28,10 @@ spec:
fieldPath: spec.nodeName
- name: DEBUG
value: "no"
- name: SHIMS
value: "clh dragonball fc qemu-nvidia-gpu qemu-sev qemu-snp qemu-tdx qemu"
- name: DEFAULT_SHIM
value: "qemu"
securityContext:
privileged: true
volumeMounts:

View File

@ -30,6 +30,10 @@ spec:
fieldPath: spec.nodeName
- name: DEBUG
value: "no"
- name: SHIMS
value: "clh dragonball fc qemu qemu-nvidia-gpu qemu-sev qemu-snp qemu-tdx"
- name: DEFAULT_SHIM
value: "qemu"
securityContext:
privileged: true
volumeMounts:

View File

@ -14,18 +14,9 @@ crio_drop_in_conf_file_debug="${crio_drop_in_conf_dir}/100-debug"
containerd_conf_file="/etc/containerd/config.toml"
containerd_conf_file_backup="${containerd_conf_file}.bak"
shims=(
"fc"
"qemu"
"qemu-nvidia-gpu"
"qemu-tdx"
"qemu-sev"
"qemu-snp"
"clh"
"dragonball"
)
IFS=' ' read -a shims <<< "$SHIMS"
default_shim="qemu"
default_shim="$DEFAULT_SHIM"
# If we fail for any reason a message will be displayed
die() {