mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-08 00:01:40 +00:00
Merge pull request #44318 from wojtek-t/edge_based_proxy_2
Automatic merge from submit-queue (batch tested with PRs 44414, 44318) Finish migration to edge-based for endpoints in KubeProxy Ref #43702
This commit is contained in:
@@ -220,9 +220,6 @@ func NewProxyServerDefault(config *options.ProxyServerConfig) (*ProxyServer, err
|
||||
|
||||
var proxier proxy.ProxyProvider
|
||||
var servicesHandler proxyconfig.ServiceConfigHandler
|
||||
// TODO: Migrate all handlers to EndpointsHandler type and
|
||||
// get rid of this one.
|
||||
var endpointsHandler proxyconfig.EndpointsConfigHandler
|
||||
var endpointsEventHandler proxyconfig.EndpointsHandler
|
||||
|
||||
proxyMode := getProxyMode(string(config.Mode), client.Core().Nodes(), hostname, iptInterface, iptables.LinuxKernelCompatTester{})
|
||||
@@ -261,7 +258,7 @@ func NewProxyServerDefault(config *options.ProxyServerConfig) (*ProxyServer, err
|
||||
// our config.EndpointsConfigHandler.
|
||||
loadBalancer := winuserspace.NewLoadBalancerRR()
|
||||
// set EndpointsHandler to our loadBalancer
|
||||
endpointsHandler = loadBalancer
|
||||
endpointsEventHandler = loadBalancer
|
||||
proxierUserspace, err := winuserspace.NewProxier(
|
||||
loadBalancer,
|
||||
net.ParseIP(config.BindAddress),
|
||||
@@ -321,12 +318,7 @@ func NewProxyServerDefault(config *options.ProxyServerConfig) (*ProxyServer, err
|
||||
go serviceConfig.Run(wait.NeverStop)
|
||||
|
||||
endpointsConfig := proxyconfig.NewEndpointsConfig(informerFactory.Core().InternalVersion().Endpoints(), config.ConfigSyncPeriod)
|
||||
if endpointsHandler != nil {
|
||||
endpointsConfig.RegisterHandler(endpointsHandler)
|
||||
}
|
||||
if endpointsEventHandler != nil {
|
||||
endpointsConfig.RegisterEventHandler(endpointsEventHandler)
|
||||
}
|
||||
endpointsConfig.RegisterEventHandler(endpointsEventHandler)
|
||||
go endpointsConfig.Run(wait.NeverStop)
|
||||
|
||||
// This has to start after the calls to NewServiceConfig and NewEndpointsConfig because those
|
||||
|
||||
@@ -143,7 +143,7 @@ func main() {
|
||||
serviceConfig.RegisterHandler(&kubemark.FakeProxyHandler{})
|
||||
|
||||
endpointsConfig := proxyconfig.NewEndpointsConfig(informerFactory.Core().InternalVersion().Endpoints(), configResyncPeriod)
|
||||
endpointsConfig.RegisterHandler(&kubemark.FakeProxyHandler{})
|
||||
endpointsConfig.RegisterEventHandler(&kubemark.FakeProxyHandler{})
|
||||
|
||||
eventClient, err := clientgoclientset.NewForConfig(clientConfig)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user