cluster proxy transport disable keepalive

Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
This commit is contained in:
huangyanfeng 2024-09-26 14:49:15 +08:00
parent e76ce6355b
commit 122ff3a07c
1 changed files with 3 additions and 2 deletions

View File

@ -183,8 +183,9 @@ func constructLocation(cluster *clusterapis.Cluster) (*url.URL, error) {
func createProxyTransport(cluster *clusterapis.Cluster, tlsConfig *tls.Config) (*http.Transport, error) {
var proxyDialerFn utilnet.DialFunc
trans := utilnet.SetTransportDefaults(&http.Transport{
DialContext: proxyDialerFn,
TLSClientConfig: tlsConfig,
DialContext: proxyDialerFn,
TLSClientConfig: tlsConfig,
DisableKeepAlives: true,
})
if proxyURL := cluster.Spec.ProxyURL; proxyURL != "" {