Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
654a0864
Commit
654a0864
authored
Apr 15, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore proxy settings for kubelet client
Proxy settings may interfere with a kubelet client communicating with the API server, so set the proxy to nil.
parent
eed6fd4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
server.go
cmd/kube-apiserver/app/server.go
+1
-0
kubelet_client.go
pkg/kubelet/client/kubelet_client.go
+5
-0
No files found.
cmd/kube-apiserver/app/server.go
View file @
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
)
...
...
pkg/kubelet/client/kubelet_client.go
View file @
654a0864
...
...
@@ -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
,
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment