mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
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:
commit
e5ae689b79
@ -66,6 +66,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
loadBalancer := proxy.NewLoadBalancerRR()
|
loadBalancer := proxy.NewLoadBalancerRR()
|
||||||
proxier := proxy.NewProxier(loadBalancer, net.IP(bindAddress), iptables.New(exec.New(), protocol))
|
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
|
// Wire proxier to handle changes to services
|
||||||
serviceConfig.RegisterHandler(proxier)
|
serviceConfig.RegisterHandler(proxier)
|
||||||
// And wire loadBalancer to handle changes to endpoints to services
|
// And wire loadBalancer to handle changes to endpoints to services
|
||||||
|
Loading…
Reference in New Issue
Block a user