kubelet/networking: add support for cni ConfigLists, pass hostport parameters

** reason for this change **
CNI has recently introduced a new configuration list feature. This
allows for plugin chaining. It also supports varied plugin versions.
This commit is contained in:
Casey Callendrello
2017-04-10 13:18:32 +02:00
parent 8963dd1b8c
commit e4eaad3d24
14 changed files with 258 additions and 43 deletions

View File

@@ -65,9 +65,9 @@ func (nh *fakeNamespaceGetter) GetNetNS(containerID string) (string, error) {
}
type FakePortMappingGetter struct {
mem map[string][]*hostport.PortMapping
PortMaps map[string][]*hostport.PortMapping
}
func (pm *FakePortMappingGetter) GetPodPortMappings(containerID string) ([]*hostport.PortMapping, error) {
return pm.mem[containerID], nil
return pm.PortMaps[containerID], nil
}