mirror of https://github.com/k3s-io/k3s
Allow override of kubeconfig dialer
parent
e443b5ca54
commit
754bcac0fc
|
@ -76,6 +76,10 @@ import (
|
|||
const etcdRetryLimit = 60
|
||||
const etcdRetryInterval = 1 * time.Second
|
||||
|
||||
var (
|
||||
DefaultProxyDialerFn utilnet.DialFunc
|
||||
)
|
||||
|
||||
// NewAPIServerCommand creates a *cobra.Command object with default parameters
|
||||
func NewAPIServerCommand(stopCh <-chan struct{}) *cobra.Command {
|
||||
s := options.NewServerRunOptions()
|
||||
|
@ -160,6 +164,10 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan
|
|||
return nil, nil, err
|
||||
}
|
||||
|
||||
if DefaultProxyDialerFn != nil {
|
||||
completedOptions.KubeletConfig.Dial = DefaultProxyDialerFn
|
||||
}
|
||||
|
||||
kubeAPIServerConfig, insecureServingInfo, serviceResolver, pluginInitializer, admissionPostStartHook, err := CreateKubeAPIServerConfig(completedOptions, proxyTransport)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
|
Loading…
Reference in New Issue