Merge pull request #999 from wilsonianb/fix-k3s

kata-deploy: fix k3s containerd check
This commit is contained in:
Graham Whaley 2020-04-06 14:20:49 +01:00 committed by GitHub
commit dce8d66a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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