This removes unused params passed to proxy server.

This commit is contained in:
Avesh Agarwal 2015-10-01 18:22:32 -04:00
parent 57a08b5563
commit 8fb96afff4

View File

@ -67,15 +67,10 @@ type ProxyServerConfig struct {
} }
type ProxyServer struct { type ProxyServer struct {
Client *kubeclient.Client
Config *ProxyServerConfig Config *ProxyServerConfig
EndpointsConfig *proxyconfig.EndpointsConfig
EndpointsHandler proxyconfig.EndpointsConfigHandler
IptInterface utiliptables.Interface IptInterface utiliptables.Interface
OOMAdjuster *oom.OOMAdjuster
Proxier proxy.ProxyProvider Proxier proxy.ProxyProvider
Recorder record.EventRecorder Recorder record.EventRecorder
ServiceConfig *proxyconfig.ServiceConfig
} }
// AddFlags adds flags for a specific ProxyServer to the specified FlagSet // AddFlags adds flags for a specific ProxyServer to the specified FlagSet
@ -122,25 +117,15 @@ func NewProxyConfig() *ProxyServerConfig {
func NewProxyServer( func NewProxyServer(
config *ProxyServerConfig, config *ProxyServerConfig,
client *kubeclient.Client,
endpointsConfig *proxyconfig.EndpointsConfig,
endpointsHandler proxyconfig.EndpointsConfigHandler,
iptInterface utiliptables.Interface, iptInterface utiliptables.Interface,
oomAdjuster *oom.OOMAdjuster,
proxier proxy.ProxyProvider, proxier proxy.ProxyProvider,
recorder record.EventRecorder, recorder record.EventRecorder,
serviceConfig *proxyconfig.ServiceConfig,
) (*ProxyServer, error) { ) (*ProxyServer, error) {
return &ProxyServer{ return &ProxyServer{
Client: client,
Config: config, Config: config,
EndpointsConfig: endpointsConfig,
EndpointsHandler: endpointsHandler,
IptInterface: iptInterface, IptInterface: iptInterface,
OOMAdjuster: oomAdjuster,
Proxier: proxier, Proxier: proxier,
Recorder: recorder, Recorder: recorder,
ServiceConfig: serviceConfig,
}, nil }, nil
} }
@ -272,8 +257,7 @@ func NewProxyServerDefault(config *ProxyServerConfig) (*ProxyServer, error) {
UID: types.UID(hostname), UID: types.UID(hostname),
Namespace: "", Namespace: "",
} }
return NewProxyServer(config, iptInterface, proxier, recorder)
return NewProxyServer(config, client, endpointsConfig, endpointsHandler, iptInterface, oomAdjuster, proxier, recorder, serviceConfig)
} }
// Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set). // Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set).