mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
kubelet: change map[string]RuntimeHandler to []RuntimeHandler
The map is changed to an array so as to retain the order of the original array propagated from the CRI runtime. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -123,11 +123,12 @@ func (kl *Kubelet) HandlerSupportsUserNamespaces(rtHandler string) (bool, error)
|
||||
if rtHandlers == nil {
|
||||
return false, fmt.Errorf("runtime handlers are not set")
|
||||
}
|
||||
h, found := rtHandlers[rtHandler]
|
||||
if !found {
|
||||
return false, fmt.Errorf("the handler %q is not known", rtHandler)
|
||||
for _, h := range rtHandlers {
|
||||
if h.Name == rtHandler {
|
||||
return h.SupportsUserNamespaces, nil
|
||||
}
|
||||
}
|
||||
return h.SupportsUserNamespaces, nil
|
||||
return false, fmt.Errorf("the handler %q is not known", rtHandler)
|
||||
}
|
||||
|
||||
// GetKubeletMappings gets the additional IDs allocated for the Kubelet.
|
||||
|
||||
Reference in New Issue
Block a user