Commit 495f5b26 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49139 from deads2k/cli-15-proxy-defaults

Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130) expose method to allow externally setting defaults on an external type The options are an exposed type. This allows you to set the defaults on them. @derekwaynecarr who normally owns this bit?
parents cf9f00bb 41a4faa6
...@@ -302,7 +302,7 @@ func (o *Options) loadConfig(data []byte) (*componentconfig.KubeProxyConfigurati ...@@ -302,7 +302,7 @@ func (o *Options) loadConfig(data []byte) (*componentconfig.KubeProxyConfigurati
return config, nil return config, nil
} }
func (o *Options) applyDefaults(in *componentconfig.KubeProxyConfiguration) (*componentconfig.KubeProxyConfiguration, error) { func (o *Options) ApplyDefaults(in *componentconfig.KubeProxyConfiguration) (*componentconfig.KubeProxyConfiguration, error) {
external, err := o.scheme.ConvertToVersion(in, v1alpha1.SchemeGroupVersion) external, err := o.scheme.ConvertToVersion(in, v1alpha1.SchemeGroupVersion)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -344,7 +344,7 @@ with the apiserver API to configure the proxy.`, ...@@ -344,7 +344,7 @@ with the apiserver API to configure the proxy.`,
}, },
} }
opts.config, err = opts.applyDefaults(opts.config) opts.config, err = opts.ApplyDefaults(opts.config)
if err != nil { if err != nil {
glog.Fatalf("unable to create flag defaults: %v", err) glog.Fatalf("unable to create flag defaults: %v", err)
} }
......
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