Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit fc00eb8

Browse files
authored
Merge pull request #2048 from serathius/avoid-token-http
Avoid passing token when using http
2 parents 6d6f584 + 6376e0a commit fc00eb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

metrics/sources/kubelet/util/kubelet_client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ func (c *KubeletClientConfig) transportConfig() *transport.Config {
7373
KeyFile: c.KeyFile,
7474
KeyData: c.KeyData,
7575
},
76-
BearerToken: c.BearerToken,
76+
}
77+
if c.EnableHttps {
78+
cfg.BearerToken = c.BearerToken
7779
}
7880
if c.EnableHttps && !cfg.HasCA() {
7981
cfg.TLS.Insecure = true

0 commit comments

Comments
 (0)