kubenet: set bridge promiscuous mode based on hairpinMode

Closes: https://github.com/kubernetes/kubernetes/issues/23657
Closes: https://github.com/kubernetes/kubernetes/issues/20475
This commit is contained in:
Dan Williams
2016-03-31 17:20:04 -05:00
parent e8dc9eae8c
commit b749902b42
13 changed files with 65 additions and 37 deletions

View File

@@ -19,12 +19,13 @@ package network
import (
"testing"
"k8s.io/kubernetes/pkg/apis/componentconfig"
nettest "k8s.io/kubernetes/pkg/kubelet/network/testing"
)
func TestSelectDefaultPlugin(t *testing.T) {
all_plugins := []NetworkPlugin{}
plug, err := InitNetworkPlugin(all_plugins, "", nettest.NewFakeHost(nil))
plug, err := InitNetworkPlugin(all_plugins, "", nettest.NewFakeHost(nil), componentconfig.HairpinNone)
if err != nil {
t.Fatalf("Unexpected error in selecting default plugin: %v", err)
}