Fix NewProxyServer

Different OSes need different args.  This is not a great fix, but better
than adding an arg to Windows which doesn't need it.
This commit is contained in:
Tim Hockin
2017-11-22 14:17:10 -08:00
parent c45820f0c8
commit 79778288de
4 changed files with 18 additions and 4 deletions

View File

@@ -54,7 +54,17 @@ import (
)
// NewProxyServer returns a new ProxyServer.
func NewProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExit bool, cleanupIPVS bool, scheme *runtime.Scheme, master string) (*ProxyServer, error) {
func NewProxyServer(o *Options) (*ProxyServer, error) {
return newProxyServer(o.config, o.CleanupAndExit, o.CleanupIPVS, o.scheme, o.master)
}
func newProxyServer(
config *proxyconfigapi.KubeProxyConfiguration,
cleanupAndExit bool,
cleanupIPVS bool,
scheme *runtime.Scheme,
master string) (*ProxyServer, error) {
if config == nil {
return nil, errors.New("config is required")
}