Skip to content

Commit

Permalink
Merge pull request #8651 from xiang90/https_srv
Browse files Browse the repository at this point in the history
embed: fix HTTPs + DNS SRV discovery
  • Loading branch information
xiang90 authored Oct 5, 2017
2 parents 867e3da + f79d5aa commit db0ea5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,9 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
}
clusterStr := strings.Join(clusterStrs, ",")
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)
// only etcd member must belong to the discovered cluster.
Expand Down

0 comments on commit db0ea5d

Please sign in to comment.