mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-21 18:53:30 +00:00
kata-deploy: improve kata-deploy script
For the rare cases where containerd_conf_file does not exist, cp could fail and let the pod in Error state. Let's make it a little bit more robust. Signed-off-by: Beraldo Leal <bleal@redhat.com>
This commit is contained in:
parent
0223eedda5
commit
b843b236e4
@ -663,7 +663,7 @@ function main() {
|
|||||||
runtime="crio"
|
runtime="crio"
|
||||||
elif [ "$runtime" == "k3s" ] || [ "$runtime" == "k3s-agent" ] || [ "$runtime" == "rke2-agent" ] || [ "$runtime" == "rke2-server" ]; then
|
elif [ "$runtime" == "k3s" ] || [ "$runtime" == "k3s-agent" ] || [ "$runtime" == "rke2-agent" ] || [ "$runtime" == "rke2-server" ]; then
|
||||||
containerd_conf_tmpl_file="${containerd_conf_file}.tmpl"
|
containerd_conf_tmpl_file="${containerd_conf_file}.tmpl"
|
||||||
if [ ! -f "$containerd_conf_tmpl_file" ]; then
|
if [ ! -f "$containerd_conf_tmpl_file" ] && [ -f "$containerd_conf_file" ]; then
|
||||||
cp "$containerd_conf_file" "$containerd_conf_tmpl_file"
|
cp "$containerd_conf_file" "$containerd_conf_tmpl_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user