Commit 9dce6402 authored by m1093782566's avatar m1093782566

fix review comments

parent dab9b84b
......@@ -144,6 +144,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
if err != nil {
return nil, fmt.Errorf("unable to create proxier: %v", err)
}
metrics.RegisterMetrics()
proxier = proxierIPTables
serviceEventHandler = proxierIPTables
endpointsEventHandler = proxierIPTables
......@@ -175,6 +176,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
if err != nil {
return nil, fmt.Errorf("unable to create proxier: %v", err)
}
metrics.RegisterMetrics()
proxier = proxierIPVS
serviceEventHandler = proxierIPVS
endpointsEventHandler = proxierIPVS
......@@ -218,8 +220,6 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
iptInterface.AddReloadFunc(proxier.Sync)
metrics.RegisterMetrics()
return &ProxyServer{
Client: client,
EventClient: eventClient,
......
......@@ -855,12 +855,6 @@ func (proxier *Proxier) OnEndpointsSynced() {
proxier.syncProxyRules()
}
type syncReason string
const syncReasonServices syncReason = "ServicesUpdate"
const syncReasonEndpoints syncReason = "EndpointsUpdate"
const syncReasonForce syncReason = "Force"
// This is where all of the ipvs calls happen.
// assumes proxier.mu is held
func (proxier *Proxier) syncProxyRules() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment