unified-storage: expose memberlist cluster label config (#104643)
* tweak ringKey/ringName for consistency and allow us to configure memberlist cluster label config * allow setting memberlist cluster label verification disabled field --------- Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
This commit is contained in:
co-authored by
Peter Štibraný
parent
1c5545da04
commit
ecea6a9366
@@ -41,6 +41,8 @@ func toMemberlistConfig(cfg *setting.Cfg) *memberlist.KVConfig {
|
||||
memberlistKVcfg.Codecs = []codec.Codec{
|
||||
ring.GetCodec(),
|
||||
}
|
||||
memberlistKVcfg.ClusterLabel = cfg.MemberlistClusterLabel
|
||||
memberlistKVcfg.ClusterLabelVerificationDisabled = cfg.MemberlistClusterLabelVerificationDisabled
|
||||
if cfg.MemberlistBindAddr != "" {
|
||||
memberlistKVcfg.TCPTransport.BindAddrs = []string{cfg.MemberlistBindAddr}
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ import (
|
||||
"google.golang.org/grpc/health/grpc_health_v1"
|
||||
)
|
||||
|
||||
const ringKey = "storage-ring"
|
||||
const ringName = "unified_storage"
|
||||
const ringKey = "unified-storage-ring"
|
||||
const ringName = "unified_storage_ring"
|
||||
const numTokens = 128
|
||||
const heartbeatTimeout = time.Minute
|
||||
|
||||
|
||||
Reference in New Issue
Block a user