mirror of https://github.com/k3s-io/k3s
Fixed http URL on etcd
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>pull/5325/head
parent
06c779c57d
commit
0746dde758
|
@ -754,9 +754,9 @@ func (e *ETCD) metricsURL(expose bool) string {
|
||||||
address := fmt.Sprintf("http://%s:2381", getLocalhostAddress(e.address))
|
address := fmt.Sprintf("http://%s:2381", getLocalhostAddress(e.address))
|
||||||
if expose {
|
if expose {
|
||||||
if utilsnet.IsIPv6String(e.address) {
|
if utilsnet.IsIPv6String(e.address) {
|
||||||
address = fmt.Sprintf("https://[%s]:2381,%s", e.address, address)
|
address = fmt.Sprintf("http://[%s]:2381,%s", e.address, address)
|
||||||
} else {
|
} else {
|
||||||
address = fmt.Sprintf("https://%s:2381,%s", e.address, address)
|
address = fmt.Sprintf("http://%s:2381,%s", e.address, address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return address
|
return address
|
||||||
|
@ -768,7 +768,7 @@ func (e *ETCD) cluster(ctx context.Context, forceNew bool, options executor.Init
|
||||||
Name: e.name,
|
Name: e.name,
|
||||||
InitialOptions: options,
|
InitialOptions: options,
|
||||||
ForceNewCluster: forceNew,
|
ForceNewCluster: forceNew,
|
||||||
ListenClientURLs: e.clientURL() + "," + fmt.Sprintf("http://%s:2379", getLocalhostAddress(e.address)),
|
ListenClientURLs: e.clientURL() + "," + fmt.Sprintf("https://%s:2379", getLocalhostAddress(e.address)),
|
||||||
ListenMetricsURLs: e.metricsURL(e.config.EtcdExposeMetrics),
|
ListenMetricsURLs: e.metricsURL(e.config.EtcdExposeMetrics),
|
||||||
ListenPeerURLs: e.peerURL(),
|
ListenPeerURLs: e.peerURL(),
|
||||||
AdvertiseClientURLs: e.clientURL(),
|
AdvertiseClientURLs: e.clientURL(),
|
||||||
|
|
Loading…
Reference in New Issue