mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
kubenet: Fix host port for rktnetes.
Because rkt pod runs after plugin.SetUpPod() is called, so getRunningPods() does not return the newly created pod, which causes the hostport iptable rules to be missing for this new pod.
This commit is contained in:
@@ -185,7 +185,7 @@ func TestOpenPodHostports(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
err := h.OpenPodHostportsAndSync(tests[0].pod, "br0", runningPods)
|
||||
err := h.OpenPodHostportsAndSync(&RunningPod{Pod: tests[0].pod, IP: net.ParseIP(tests[0].ip)}, "br0", runningPods)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to OpenPodHostportsAndSync: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user