kata-deploy: Rely on the configure config path

Instead of passing a `KATA_CONF_FILE` environament variable, let's rely
on the configured (in the container engine) config path, as both
containerd and CRI-O support it, and we're using this for both of them.

This is a "backport" of f7ccf92dc8, from
the original `kata-deploy.sh` to the one used for Confidential
Containers.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2022-09-05 14:20:29 +02:00
parent f684d00d50
commit a43f95d01b

View File

@ -94,10 +94,7 @@ function configure_different_shims_base() {
fi
fi
cat << EOF | tee "$shim_file"
#!/usr/bin/env bash
KATA_CONF_FILE=/opt/confidential-containers/share/defaults/kata-containers/configuration-${shim}.toml /opt/confidential-containers/bin/containerd-shim-kata-v2 "\$@"
EOF
ln -sf /opt/kata/bin/containerd-shim-kata-v2 "${shim_file}"
chmod +x "$shim_file"
if [ "${shim}" == "${default_shim}" ]; then