mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
use version.Program
Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
parent
301fb73952
commit
00831f9bc8
@ -80,7 +80,7 @@ func getNodeNamedCrt(nodeName, nodeIP, nodePasswordFile string) HTTPRequester {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req.Header.Set(version.Program+"-Node-Password", nodePassword)
|
req.Header.Set(version.Program+"-Node-Password", nodePassword)
|
||||||
req.Header.Set("X-K3S-NODE-IP", nodeIP)
|
req.Header.Set("X-"+version.Program+"-NODE-IP", nodeIP)
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -142,7 +142,7 @@ func servingKubeletCert(server *config.Control, keyFile string) http.Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ips := []net.IP{net.ParseIP("127.0.0.1")}
|
ips := []net.IP{net.ParseIP("127.0.0.1")}
|
||||||
if nodeIP := req.Header.Get("X-K3S-NODE-IP"); nodeIP != "" {
|
if nodeIP := req.Header.Get("X-" + version.Program + "-NODE-IP"); nodeIP != "" {
|
||||||
ips = append(ips, net.ParseIP(nodeIP))
|
ips = append(ips, net.ParseIP(nodeIP))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user