Merge pull request #2937 from jdef/proxy_failfast

proxy should fail fast if proxier is nil, rather than panic later
This commit is contained in:
Brendan Burns 2014-12-15 11:45:27 -08:00
commit e5ae689b79

View File

@ -66,6 +66,9 @@ func main() {
}
loadBalancer := proxy.NewLoadBalancerRR()
proxier := proxy.NewProxier(loadBalancer, net.IP(bindAddress), iptables.New(exec.New(), protocol))
if proxier == nil {
glog.Fatalf("failed to create proxier, aborting")
}
// Wire proxier to handle changes to services
serviceConfig.RegisterHandler(proxier)
// And wire loadBalancer to handle changes to endpoints to services