mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 07:19:06 +00:00
kata-deploy: fix k3s containerd check
The default k3s containerRuntimeVersion takes the form of: containerd://1.3.3-k3s2 The awk was stripping away the k3s portion before checking if it was a k3s containerd. fixes #996 Signed-off-by: Brandon Wilson <brandon@coil.com>
This commit is contained in:
parent
b4ecfdb2dc
commit
96f3b99c7a
@ -33,7 +33,7 @@ function print_usage() {
|
||||
|
||||
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
|
||||
die "invalid node name"
|
||||
fi
|
||||
@ -44,7 +44,7 @@ function get_container_runtime() {
|
||||
echo "k3s"
|
||||
fi
|
||||
else
|
||||
echo "$runtime"
|
||||
echo "$runtime" | awk -F '[:]' '{print $1}'
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user