Unverified Commit 52f3b424 authored by Darren Shepherd's avatar Darren Shepherd Committed by GitHub

Merge pull request #352 from erikwilson/k3s-kubelet-client-nil-proxy

Ignore proxy settings for kubelet client
parents 33aed306 654a0864
......@@ -169,6 +169,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan
if DefaultProxyDialerFn != nil {
completedOptions.KubeletConfig.Dial = DefaultProxyDialerFn
completedOptions.KubeletConfig.Proxy = http.ProxyURL(nil)
}
kubeAPIServerConfig, insecureServingInfo, serviceResolver, pluginInitializer, admissionPostStartHook, err := CreateKubeAPIServerConfig(completedOptions, proxyTransport)
......
......@@ -19,6 +19,7 @@ package client
import (
"context"
"net/http"
"net/url"
"strconv"
"time"
......@@ -51,6 +52,9 @@ type KubeletClientConfig struct {
// Dial is a custom dialer used for the client
Dial utilnet.DialFunc
// Proxy is a custom proxy function for the client
Proxy func(*http.Request) (*url.URL, error)
}
// ConnectionInfo provides the information needed to connect to a kubelet
......@@ -77,6 +81,7 @@ func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error) {
rt = utilnet.SetOldTransportDefaults(&http.Transport{
DialContext: config.Dial,
TLSClientConfig: tlsConfig,
Proxy: config.Proxy,
})
}
......
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