mirror of
https://github.com/rancher/rke.git
synced 2025-07-14 07:36:05 +00:00
Fix etcd client endpoint address
This commit is contained in:
parent
fb1fd833ce
commit
0069872976
@ -578,9 +578,8 @@ func (c *Cluster) BuildEtcdProcess(host *hosts.Host, etcdHosts []*hosts.Host, pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
Binds = append(Binds, c.Services.Etcd.ExtraBinds...)
|
Binds = append(Binds, c.Services.Etcd.ExtraBinds...)
|
||||||
|
|
||||||
healthCheck := v3.HealthCheck{
|
healthCheck := v3.HealthCheck{
|
||||||
URL: services.EtcdHealthCheckURL,
|
URL: fmt.Sprintf("https://%s:2379/health", host.InternalAddress),
|
||||||
}
|
}
|
||||||
registryAuthConfig, _, _ := docker.GetImageRegistryConfig(c.Services.Etcd.Image, c.PrivateRegistriesMap)
|
registryAuthConfig, _, _ := docker.GetImageRegistryConfig(c.Services.Etcd.Image, c.PrivateRegistriesMap)
|
||||||
|
|
||||||
|
@ -16,10 +16,6 @@ import (
|
|||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
EtcdHealthCheckURL = "https://127.0.0.1:2379/health"
|
|
||||||
)
|
|
||||||
|
|
||||||
func RunEtcdPlane(ctx context.Context, etcdHosts []*hosts.Host, etcdNodePlanMap map[string]v3.RKEConfigNodePlan, localConnDialerFactory hosts.DialerFactory, prsMap map[string]v3.PrivateRegistry, updateWorkersOnly bool, alpineImage string) error {
|
func RunEtcdPlane(ctx context.Context, etcdHosts []*hosts.Host, etcdNodePlanMap map[string]v3.RKEConfigNodePlan, localConnDialerFactory hosts.DialerFactory, prsMap map[string]v3.PrivateRegistry, updateWorkersOnly bool, alpineImage string) error {
|
||||||
log.Infof(ctx, "[%s] Building up etcd plane..", ETCDRole)
|
log.Infof(ctx, "[%s] Building up etcd plane..", ETCDRole)
|
||||||
for _, host := range etcdHosts {
|
for _, host := range etcdHosts {
|
||||||
|
@ -32,7 +32,7 @@ func getEtcdClient(ctx context.Context, etcdHost *hosts.Host, localConnDialerFac
|
|||||||
}
|
}
|
||||||
|
|
||||||
cfg := etcdclient.Config{
|
cfg := etcdclient.Config{
|
||||||
Endpoints: []string{"https://127.0.0.1:2379"},
|
Endpoints: []string{"https://" + etcdHost.InternalAddress + ":2379"},
|
||||||
Transport: DefaultEtcdTransport,
|
Transport: DefaultEtcdTransport,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user