mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #115437 from bobbypage/115219-followup
test: Update runtime class detection logic
This commit is contained in:
commit
046595f11f
@ -69,13 +69,15 @@ func NodeSupportsPreconfiguredRuntimeClassHandler(ctx context.Context, f *framew
|
|||||||
// If the `runtimes.test-handler` substring is found in the runtime config, it is assumed that the handler is configured.
|
// If the `runtimes.test-handler` substring is found in the runtime config, it is assumed that the handler is configured.
|
||||||
cmd := fmt.Sprintf(`if [ -e '/etc/containerd/config.toml' ]; then
|
cmd := fmt.Sprintf(`if [ -e '/etc/containerd/config.toml' ]; then
|
||||||
grep -q 'runtimes.%s' /etc/containerd/config.toml
|
grep -q 'runtimes.%s' /etc/containerd/config.toml
|
||||||
return
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e '/etc/crio/crio.conf' ]; then
|
if [ -e '/etc/crio/crio.conf' ]; then
|
||||||
grep -q 'runtimes.%s' /etc/crio/crio.conf
|
grep -q 'runtimes.%s' /etc/crio/crio.conf
|
||||||
return
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
`, PreconfiguredRuntimeClassHandler, PreconfiguredRuntimeClassHandler)
|
`, PreconfiguredRuntimeClassHandler, PreconfiguredRuntimeClassHandler)
|
||||||
|
|
||||||
_, err = hostExec.IssueCommandWithResult(ctx, cmd, node)
|
_, err = hostExec.IssueCommandWithResult(ctx, cmd, node)
|
||||||
|
Loading…
Reference in New Issue
Block a user