mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
Merge pull request #999 from wilsonianb/fix-k3s
kata-deploy: fix k3s containerd check
This commit is contained in:
commit
dce8d66a30
@ -33,7 +33,7 @@ function print_usage() {
|
|||||||
|
|
||||||
function get_container_runtime() {
|
function get_container_runtime() {
|
||||||
|
|
||||||
local runtime=$(kubectl get node $NODE_NAME -o jsonpath='{.status.nodeInfo.containerRuntimeVersion}' | awk -F '[:]' '{print $1}')
|
local runtime=$(kubectl get node $NODE_NAME -o jsonpath='{.status.nodeInfo.containerRuntimeVersion}')
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
die "invalid node name"
|
die "invalid node name"
|
||||||
fi
|
fi
|
||||||
@ -44,7 +44,7 @@ function get_container_runtime() {
|
|||||||
echo "k3s"
|
echo "k3s"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$runtime"
|
echo "$runtime" | awk -F '[:]' '{print $1}'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user