Merge pull request #8264 from thockin/proxier-retry
Unexport a symbol in proxier
This commit is contained in:
commit
c50f906170
@ -334,10 +334,10 @@ func NewProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptables.In
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
glog.Infof("Setting Proxy IP to %v", hostIP)
|
glog.Infof("Setting Proxy IP to %v", hostIP)
|
||||||
return CreateProxier(loadBalancer, listenIP, iptables, hostIP)
|
return createProxier(loadBalancer, listenIP, iptables, hostIP)
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptables.Interface, hostIP net.IP) *Proxier {
|
func createProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptables.Interface, hostIP net.IP) *Proxier {
|
||||||
glog.Infof("Initializing iptables")
|
glog.Infof("Initializing iptables")
|
||||||
// Clean up old messes. Ignore erors.
|
// Clean up old messes. Ignore erors.
|
||||||
iptablesDeleteOld(iptables)
|
iptablesDeleteOld(iptables)
|
||||||
|
@ -206,7 +206,7 @@ func TestTCPProxy(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -230,7 +230,7 @@ func TestUDPProxy(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
||||||
@ -259,7 +259,7 @@ func TestMultiPortProxy(t *testing.T) {
|
|||||||
}},
|
}},
|
||||||
}})
|
}})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfoP, err := p.addServiceOnPort(serviceP, "TCP", 0, time.Second)
|
svcInfoP, err := p.addServiceOnPort(serviceP, "TCP", 0, time.Second)
|
||||||
@ -283,7 +283,7 @@ func TestMultiPortOnUpdate(t *testing.T) {
|
|||||||
serviceQ := ServicePortName{types.NamespacedName{"testnamespace", "echo"}, "q"}
|
serviceQ := ServicePortName{types.NamespacedName{"testnamespace", "echo"}, "q"}
|
||||||
serviceX := ServicePortName{types.NamespacedName{"testnamespace", "echo"}, "x"}
|
serviceX := ServicePortName{types.NamespacedName{"testnamespace", "echo"}, "x"}
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
p.OnUpdate([]api.Service{{
|
p.OnUpdate([]api.Service{{
|
||||||
@ -343,7 +343,7 @@ func TestTCPProxyStop(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -378,7 +378,7 @@ func TestUDPProxyStop(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
||||||
@ -413,7 +413,7 @@ func TestTCPProxyUpdateDelete(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -447,7 +447,7 @@ func TestUDPProxyUpdateDelete(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
||||||
@ -481,7 +481,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -530,7 +530,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
||||||
@ -579,7 +579,7 @@ func TestTCPProxyUpdatePort(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -624,7 +624,7 @@ func TestUDPProxyUpdatePort(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "UDP", 0, time.Second)
|
||||||
@ -666,7 +666,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
@ -715,7 +715,7 @@ func TestProxyUpdatePortal(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
p := CreateProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
p := createProxier(lb, net.ParseIP("0.0.0.0"), &fakeIptables{}, net.ParseIP("127.0.0.1"))
|
||||||
waitForNumProxyLoops(t, p, 0)
|
waitForNumProxyLoops(t, p, 0)
|
||||||
|
|
||||||
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
svcInfo, err := p.addServiceOnPort(service, "TCP", 0, time.Second)
|
||||||
|
Loading…
Reference in New Issue
Block a user