Commit de5f74e6 authored by Darren Shepherd's avatar Darren Shepherd

Allow override of kubeconfig dialer

parent de6d2da9
...@@ -91,6 +91,10 @@ const ( ...@@ -91,6 +91,10 @@ const (
etcdRetryInterval = 1 * time.Second etcdRetryInterval = 1 * time.Second
) )
var (
DefaultProxyDialerFn utilnet.DialFunc
)
// NewAPIServerCommand creates a *cobra.Command object with default parameters // NewAPIServerCommand creates a *cobra.Command object with default parameters
func NewAPIServerCommand(stopCh <-chan struct{}) *cobra.Command { func NewAPIServerCommand(stopCh <-chan struct{}) *cobra.Command {
s := options.NewServerRunOptions() s := options.NewServerRunOptions()
...@@ -163,7 +167,12 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan ...@@ -163,7 +167,12 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan
return nil, err return nil, err
} }
if DefaultProxyDialerFn != nil {
completedOptions.KubeletConfig.Dial = DefaultProxyDialerFn
}
kubeAPIServerConfig, insecureServingInfo, serviceResolver, pluginInitializer, admissionPostStartHook, err := CreateKubeAPIServerConfig(completedOptions, nodeTunneler, proxyTransport) kubeAPIServerConfig, insecureServingInfo, serviceResolver, pluginInitializer, admissionPostStartHook, err := CreateKubeAPIServerConfig(completedOptions, nodeTunneler, proxyTransport)
if err != nil { if err != nil {
return nil, err return nil, 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