mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
expose method to allow externally setting defaults on an external type
This commit is contained in:
parent
6b78eeca84
commit
41a4faa611
@ -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.`,
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user