Skip to content

Commit bba3b9a

Browse files
authored
Include dynamodb as a ring store in the docs (#7010)
Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent ca9dba6 commit bba3b9a

File tree

4 files changed

+64
-64
lines changed

4 files changed

+64
-64
lines changed

docs/blocks-storage/compactor.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,19 @@ compactor:
195195

196196
sharding_ring:
197197
kvstore:
198-
# Backend storage to use for the ring. Supported values are: consul, etcd,
199-
# inmemory, memberlist, multi.
198+
# Backend storage to use for the ring. Supported values are: consul,
199+
# dynamodb, etcd, inmemory, memberlist, multi.
200200
# CLI flag: -compactor.ring.store
201201
[store: <string> | default = "consul"]
202202

203203
# The prefix for the keys in the store. Should end with a /.
204204
# CLI flag: -compactor.ring.prefix
205205
[prefix: <string> | default = "collectors/"]
206206

207+
# The consul_config configures the consul client.
208+
# The CLI flags prefix for this block config is: compactor.ring
209+
[consul: <consul_config>]
210+
207211
dynamodb:
208212
# Region to access dynamodb.
209213
# CLI flag: -compactor.ring.dynamodb.region
@@ -229,10 +233,6 @@ compactor:
229233
# CLI flag: -compactor.ring.dynamodb.timeout
230234
[timeout: <duration> | default = 2m]
231235

232-
# The consul_config configures the consul client.
233-
# The CLI flags prefix for this block config is: compactor.ring
234-
[consul: <consul_config>]
235-
236236
# The etcd_config configures the etcd client.
237237
# The CLI flags prefix for this block config is: compactor.ring
238238
[etcd: <etcd_config>]

docs/blocks-storage/store-gateway.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,20 @@ store_gateway:
210210
# This option needs be set both on the store-gateway and querier when
211211
# running in microservices mode.
212212
kvstore:
213-
# Backend storage to use for the ring. Supported values are: consul, etcd,
214-
# inmemory, memberlist, multi.
213+
# Backend storage to use for the ring. Supported values are: consul,
214+
# dynamodb, etcd, inmemory, memberlist, multi.
215215
# CLI flag: -store-gateway.sharding-ring.store
216216
[store: <string> | default = "consul"]
217217

218218
# The prefix for the keys in the store. Should end with a /.
219219
# CLI flag: -store-gateway.sharding-ring.prefix
220220
[prefix: <string> | default = "collectors/"]
221221

222+
# The consul_config configures the consul client.
223+
# The CLI flags prefix for this block config is:
224+
# store-gateway.sharding-ring
225+
[consul: <consul_config>]
226+
222227
dynamodb:
223228
# Region to access dynamodb.
224229
# CLI flag: -store-gateway.sharding-ring.dynamodb.region
@@ -244,11 +249,6 @@ store_gateway:
244249
# CLI flag: -store-gateway.sharding-ring.dynamodb.timeout
245250
[timeout: <duration> | default = 2m]
246251

247-
# The consul_config configures the consul client.
248-
# The CLI flags prefix for this block config is:
249-
# store-gateway.sharding-ring
250-
[consul: <consul_config>]
251-
252252
# The etcd_config configures the etcd client.
253253
# The CLI flags prefix for this block config is:
254254
# store-gateway.sharding-ring

docs/configuration/config-file-reference.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,19 @@ parquet_converter:
192192

193193
ring:
194194
kvstore:
195-
# Backend storage to use for the ring. Supported values are: consul, etcd,
196-
# inmemory, memberlist, multi.
195+
# Backend storage to use for the ring. Supported values are: consul,
196+
# dynamodb, etcd, inmemory, memberlist, multi.
197197
# CLI flag: -parquet-converter.ring.store
198198
[store: <string> | default = "consul"]
199199

200200
# The prefix for the keys in the store. Should end with a /.
201201
# CLI flag: -parquet-converter.ring.prefix
202202
[prefix: <string> | default = "collectors/"]
203203

204+
# The consul_config configures the consul client.
205+
# The CLI flags prefix for this block config is: parquet-converter.ring
206+
[consul: <consul_config>]
207+
204208
dynamodb:
205209
# Region to access dynamodb.
206210
# CLI flag: -parquet-converter.ring.dynamodb.region
@@ -226,10 +230,6 @@ parquet_converter:
226230
# CLI flag: -parquet-converter.ring.dynamodb.timeout
227231
[timeout: <duration> | default = 2m]
228232

229-
# The consul_config configures the consul client.
230-
# The CLI flags prefix for this block config is: parquet-converter.ring
231-
[consul: <consul_config>]
232-
233233
# The etcd_config configures the etcd client.
234234
# The CLI flags prefix for this block config is: parquet-converter.ring
235235
[etcd: <etcd_config>]
@@ -451,15 +451,19 @@ The `alertmanager_config` configures the Cortex alertmanager.
451451
sharding_ring:
452452
# The key-value store used to share the hash ring across multiple instances.
453453
kvstore:
454-
# Backend storage to use for the ring. Supported values are: consul, etcd,
455-
# inmemory, memberlist, multi.
454+
# Backend storage to use for the ring. Supported values are: consul,
455+
# dynamodb, etcd, inmemory, memberlist, multi.
456456
# CLI flag: -alertmanager.sharding-ring.store
457457
[store: <string> | default = "consul"]
458458
459459
# The prefix for the keys in the store. Should end with a /.
460460
# CLI flag: -alertmanager.sharding-ring.prefix
461461
[prefix: <string> | default = "alertmanagers/"]
462462
463+
# The consul_config configures the consul client.
464+
# The CLI flags prefix for this block config is: alertmanager.sharding-ring
465+
[consul: <consul_config>]
466+
463467
dynamodb:
464468
# Region to access dynamodb.
465469
# CLI flag: -alertmanager.sharding-ring.dynamodb.region
@@ -485,10 +489,6 @@ sharding_ring:
485489
# CLI flag: -alertmanager.sharding-ring.dynamodb.timeout
486490
[timeout: <duration> | default = 2m]
487491
488-
# The consul_config configures the consul client.
489-
# The CLI flags prefix for this block config is: alertmanager.sharding-ring
490-
[consul: <consul_config>]
491-
492492
# The etcd_config configures the etcd client.
493493
# The CLI flags prefix for this block config is: alertmanager.sharding-ring
494494
[etcd: <etcd_config>]
@@ -2710,15 +2710,19 @@ The `compactor_config` configures the compactor for the blocks storage.
27102710
27112711
sharding_ring:
27122712
kvstore:
2713-
# Backend storage to use for the ring. Supported values are: consul, etcd,
2714-
# inmemory, memberlist, multi.
2713+
# Backend storage to use for the ring. Supported values are: consul,
2714+
# dynamodb, etcd, inmemory, memberlist, multi.
27152715
# CLI flag: -compactor.ring.store
27162716
[store: <string> | default = "consul"]
27172717
27182718
# The prefix for the keys in the store. Should end with a /.
27192719
# CLI flag: -compactor.ring.prefix
27202720
[prefix: <string> | default = "collectors/"]
27212721
2722+
# The consul_config configures the consul client.
2723+
# The CLI flags prefix for this block config is: compactor.ring
2724+
[consul: <consul_config>]
2725+
27222726
dynamodb:
27232727
# Region to access dynamodb.
27242728
# CLI flag: -compactor.ring.dynamodb.region
@@ -2744,10 +2748,6 @@ sharding_ring:
27442748
# CLI flag: -compactor.ring.dynamodb.timeout
27452749
[timeout: <duration> | default = 2m]
27462750
2747-
# The consul_config configures the consul client.
2748-
# The CLI flags prefix for this block config is: compactor.ring
2749-
[consul: <consul_config>]
2750-
27512751
# The etcd_config configures the etcd client.
27522752
# The CLI flags prefix for this block config is: compactor.ring
27532753
[etcd: <etcd_config>]
@@ -3039,15 +3039,19 @@ ha_tracker:
30393039
# supported by the HA tracker since gossip propagation is too slow for HA
30403040
# purposes.
30413041
kvstore:
3042-
# Backend storage to use for the ring. Supported values are: consul, etcd,
3043-
# inmemory, memberlist, multi.
3042+
# Backend storage to use for the ring. Supported values are: consul,
3043+
# dynamodb, etcd, inmemory, memberlist, multi.
30443044
# CLI flag: -distributor.ha-tracker.store
30453045
[store: <string> | default = "consul"]
30463046
30473047
# The prefix for the keys in the store. Should end with a /.
30483048
# CLI flag: -distributor.ha-tracker.prefix
30493049
[prefix: <string> | default = "ha-tracker/"]
30503050
3051+
# The consul_config configures the consul client.
3052+
# The CLI flags prefix for this block config is: distributor.ha-tracker
3053+
[consul: <consul_config>]
3054+
30513055
dynamodb:
30523056
# Region to access dynamodb.
30533057
# CLI flag: -distributor.ha-tracker.dynamodb.region
@@ -3073,10 +3077,6 @@ ha_tracker:
30733077
# CLI flag: -distributor.ha-tracker.dynamodb.timeout
30743078
[timeout: <duration> | default = 2m]
30753079
3076-
# The consul_config configures the consul client.
3077-
# The CLI flags prefix for this block config is: distributor.ha-tracker
3078-
[consul: <consul_config>]
3079-
30803080
# The etcd_config configures the etcd client.
30813081
# The CLI flags prefix for this block config is: distributor.ha-tracker
30823082
[etcd: <etcd_config>]
@@ -3147,15 +3147,19 @@ ha_tracker:
31473147
31483148
ring:
31493149
kvstore:
3150-
# Backend storage to use for the ring. Supported values are: consul, etcd,
3151-
# inmemory, memberlist, multi.
3150+
# Backend storage to use for the ring. Supported values are: consul,
3151+
# dynamodb, etcd, inmemory, memberlist, multi.
31523152
# CLI flag: -distributor.ring.store
31533153
[store: <string> | default = "consul"]
31543154
31553155
# The prefix for the keys in the store. Should end with a /.
31563156
# CLI flag: -distributor.ring.prefix
31573157
[prefix: <string> | default = "collectors/"]
31583158
3159+
# The consul_config configures the consul client.
3160+
# The CLI flags prefix for this block config is: distributor.ring
3161+
[consul: <consul_config>]
3162+
31593163
dynamodb:
31603164
# Region to access dynamodb.
31613165
# CLI flag: -distributor.ring.dynamodb.region
@@ -3181,10 +3185,6 @@ ring:
31813185
# CLI flag: -distributor.ring.dynamodb.timeout
31823186
[timeout: <duration> | default = 2m]
31833187
3184-
# The consul_config configures the consul client.
3185-
# The CLI flags prefix for this block config is: distributor.ring
3186-
[consul: <consul_config>]
3187-
31883188
# The etcd_config configures the etcd client.
31893189
# The CLI flags prefix for this block config is: distributor.ring
31903190
[etcd: <etcd_config>]
@@ -3495,15 +3495,18 @@ The `ingester_config` configures the Cortex ingester.
34953495
lifecycler:
34963496
ring:
34973497
kvstore:
3498-
# Backend storage to use for the ring. Supported values are: consul, etcd,
3499-
# inmemory, memberlist, multi.
3498+
# Backend storage to use for the ring. Supported values are: consul,
3499+
# dynamodb, etcd, inmemory, memberlist, multi.
35003500
# CLI flag: -ring.store
35013501
[store: <string> | default = "consul"]
35023502
35033503
# The prefix for the keys in the store. Should end with a /.
35043504
# CLI flag: -ring.prefix
35053505
[prefix: <string> | default = "collectors/"]
35063506
3507+
# The consul_config configures the consul client.
3508+
[consul: <consul_config>]
3509+
35073510
dynamodb:
35083511
# Region to access dynamodb.
35093512
# CLI flag: -dynamodb.region
@@ -3529,9 +3532,6 @@ lifecycler:
35293532
# CLI flag: -dynamodb.timeout
35303533
[timeout: <duration> | default = 2m]
35313534
3532-
# The consul_config configures the consul client.
3533-
[consul: <consul_config>]
3534-
35353535
# The etcd_config configures the etcd client.
35363536
[etcd: <etcd_config>]
35373537
@@ -5300,15 +5300,19 @@ alertmanager_client:
53005300

53015301
ring:
53025302
kvstore:
5303-
# Backend storage to use for the ring. Supported values are: consul, etcd,
5304-
# inmemory, memberlist, multi.
5303+
# Backend storage to use for the ring. Supported values are: consul,
5304+
# dynamodb, etcd, inmemory, memberlist, multi.
53055305
# CLI flag: -ruler.ring.store
53065306
[store: <string> | default = "consul"]
53075307

53085308
# The prefix for the keys in the store. Should end with a /.
53095309
# CLI flag: -ruler.ring.prefix
53105310
[prefix: <string> | default = "rulers/"]
53115311

5312+
# The consul_config configures the consul client.
5313+
# The CLI flags prefix for this block config is: ruler.ring
5314+
[consul: <consul_config>]
5315+
53125316
dynamodb:
53135317
# Region to access dynamodb.
53145318
# CLI flag: -ruler.ring.dynamodb.region
@@ -5334,10 +5338,6 @@ ring:
53345338
# CLI flag: -ruler.ring.dynamodb.timeout
53355339
[timeout: <duration> | default = 2m]
53365340

5337-
# The consul_config configures the consul client.
5338-
# The CLI flags prefix for this block config is: ruler.ring
5339-
[consul: <consul_config>]
5340-
53415341
# The etcd_config configures the etcd client.
53425342
# The CLI flags prefix for this block config is: ruler.ring
53435343
[etcd: <etcd_config>]
@@ -6323,15 +6323,19 @@ sharding_ring:
63236323
# This option needs be set both on the store-gateway and querier when running
63246324
# in microservices mode.
63256325
kvstore:
6326-
# Backend storage to use for the ring. Supported values are: consul, etcd,
6327-
# inmemory, memberlist, multi.
6326+
# Backend storage to use for the ring. Supported values are: consul,
6327+
# dynamodb, etcd, inmemory, memberlist, multi.
63286328
# CLI flag: -store-gateway.sharding-ring.store
63296329
[store: <string> | default = "consul"]
63306330
63316331
# The prefix for the keys in the store. Should end with a /.
63326332
# CLI flag: -store-gateway.sharding-ring.prefix
63336333
[prefix: <string> | default = "collectors/"]
63346334
6335+
# The consul_config configures the consul client.
6336+
# The CLI flags prefix for this block config is: store-gateway.sharding-ring
6337+
[consul: <consul_config>]
6338+
63356339
dynamodb:
63366340
# Region to access dynamodb.
63376341
# CLI flag: -store-gateway.sharding-ring.dynamodb.region
@@ -6357,10 +6361,6 @@ sharding_ring:
63576361
# CLI flag: -store-gateway.sharding-ring.dynamodb.timeout
63586362
[timeout: <duration> | default = 2m]
63596363
6360-
# The consul_config configures the consul client.
6361-
# The CLI flags prefix for this block config is: store-gateway.sharding-ring
6362-
[consul: <consul_config>]
6363-
63646364
# The etcd_config configures the etcd client.
63656365
# The CLI flags prefix for this block config is: store-gateway.sharding-ring
63666366
[etcd: <etcd_config>]

pkg/ring/kv/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ var inmemoryStoreInit sync.Once
3939
var inmemoryStore Client
4040

4141
// StoreConfig is a configuration used for building single store client, either
42-
// Consul, Etcd, Memberlist or MultiClient. It was extracted from Config to keep
42+
// Consul, DynamoDB, Etcd, Memberlist or MultiClient. It was extracted from Config to keep
4343
// single-client config separate from final client-config (with all the wrappers)
4444
type StoreConfig struct {
45-
DynamoDB dynamodb.Config `yaml:"dynamodb"`
4645
Consul consul.Config `yaml:"consul"`
46+
DynamoDB dynamodb.Config `yaml:"dynamodb"`
4747
Etcd etcd.Config `yaml:"etcd"`
4848
Multi MultiConfig `yaml:"multi"`
4949

@@ -81,7 +81,7 @@ func (cfg *Config) RegisterFlagsWithPrefix(flagsPrefix, defaultPrefix string, f
8181
flagsPrefix = "ring."
8282
}
8383
f.StringVar(&cfg.Prefix, flagsPrefix+"prefix", defaultPrefix, "The prefix for the keys in the store. Should end with a /.")
84-
f.StringVar(&cfg.Store, flagsPrefix+"store", "consul", "Backend storage to use for the ring. Supported values are: consul, etcd, inmemory, memberlist, multi.")
84+
f.StringVar(&cfg.Store, flagsPrefix+"store", "consul", "Backend storage to use for the ring. Supported values are: consul, dynamodb, etcd, inmemory, memberlist, multi.")
8585
}
8686

8787
// Client is a high-level client for key-value stores (such as Etcd and
@@ -120,7 +120,7 @@ type Client interface {
120120
LastUpdateTime(key string) time.Time
121121
}
122122

123-
// NewClient creates a new Client (consul, etcd or inmemory) based on the config,
123+
// NewClient creates a new Client based on the config,
124124
// encodes and decodes data for storage using the codec.
125125
func NewClient(cfg Config, codec codec.Codec, reg prometheus.Registerer, logger log.Logger) (Client, error) {
126126
if cfg.Mock != nil {

0 commit comments

Comments
 (0)