mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed: fix HTTPs + DNS SRV discovery
This commit is contained in:
parent
a954a0de53
commit
78f8d6e185
@ -331,7 +331,9 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
|
|||||||
}
|
}
|
||||||
clusterStr := strings.Join(clusterStrs, ",")
|
clusterStr := strings.Join(clusterStrs, ",")
|
||||||
if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
|
if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
|
||||||
cfg.PeerTLSInfo.ServerName = cfg.DNSCluster
|
// SRV targets have subdomains under the given DNSCluster, so wildcard matching
|
||||||
|
// is needed.
|
||||||
|
cfg.PeerTLSInfo.ServerName = "*." + cfg.DNSCluster
|
||||||
}
|
}
|
||||||
urlsmap, err = types.NewURLsMap(clusterStr)
|
urlsmap, err = types.NewURLsMap(clusterStr)
|
||||||
// only etcd member must belong to the discovered cluster.
|
// only etcd member must belong to the discovered cluster.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user