mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
fix review comments
This commit is contained in:
parent
dab9b84b67
commit
9dce640213
@ -144,6 +144,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to create proxier: %v", err)
|
return nil, fmt.Errorf("unable to create proxier: %v", err)
|
||||||
}
|
}
|
||||||
|
metrics.RegisterMetrics()
|
||||||
proxier = proxierIPTables
|
proxier = proxierIPTables
|
||||||
serviceEventHandler = proxierIPTables
|
serviceEventHandler = proxierIPTables
|
||||||
endpointsEventHandler = proxierIPTables
|
endpointsEventHandler = proxierIPTables
|
||||||
@ -175,6 +176,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to create proxier: %v", err)
|
return nil, fmt.Errorf("unable to create proxier: %v", err)
|
||||||
}
|
}
|
||||||
|
metrics.RegisterMetrics()
|
||||||
proxier = proxierIPVS
|
proxier = proxierIPVS
|
||||||
serviceEventHandler = proxierIPVS
|
serviceEventHandler = proxierIPVS
|
||||||
endpointsEventHandler = proxierIPVS
|
endpointsEventHandler = proxierIPVS
|
||||||
@ -218,8 +220,6 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
|
|||||||
|
|
||||||
iptInterface.AddReloadFunc(proxier.Sync)
|
iptInterface.AddReloadFunc(proxier.Sync)
|
||||||
|
|
||||||
metrics.RegisterMetrics()
|
|
||||||
|
|
||||||
return &ProxyServer{
|
return &ProxyServer{
|
||||||
Client: client,
|
Client: client,
|
||||||
EventClient: eventClient,
|
EventClient: eventClient,
|
||||||
|
@ -855,12 +855,6 @@ func (proxier *Proxier) OnEndpointsSynced() {
|
|||||||
proxier.syncProxyRules()
|
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.
|
// This is where all of the ipvs calls happen.
|
||||||
// assumes proxier.mu is held
|
// assumes proxier.mu is held
|
||||||
func (proxier *Proxier) syncProxyRules() {
|
func (proxier *Proxier) syncProxyRules() {
|
||||||
|
Loading…
Reference in New Issue
Block a user