mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
kubelet: silence "unknown runtime class" errors when unsupported
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
6680700b5d
commit
4a776f66ec
@ -2456,6 +2456,11 @@ func (kl *Kubelet) runtimeClassSupportsRecursiveReadOnlyMounts(pod *v1.Pod) bool
|
||||
// runtimeClassSupportsRecursiveReadOnlyMounts checks whether the runtime class supports recursive read-only mounts.
|
||||
// The kubelet feature gate is not checked here.
|
||||
func runtimeClassSupportsRecursiveReadOnlyMounts(runtimeClassName string, runtimeHandlers []kubecontainer.RuntimeHandler) bool {
|
||||
if len(runtimeHandlers) == 0 {
|
||||
// The runtime does not support returning the handler list.
|
||||
// No need to print a warning here.
|
||||
return false
|
||||
}
|
||||
for _, h := range runtimeHandlers {
|
||||
if h.Name == runtimeClassName {
|
||||
return h.SupportsRecursiveReadOnlyMounts
|
||||
|
Loading…
Reference in New Issue
Block a user