|
71 | 71 | sharded_queries_enabled: false,
|
72 | 72 | },
|
73 | 73 |
|
74 |
| - storage_backend: error 'must define storage_backend as a comma separated list of backends in use,\n valid entries: dynamodb,s3,gcs,bigtable,cassandra. Typically this would be two entries, e.g. `gcs,bigtable`', |
75 |
| - |
76 |
| - enabledBackends: [ |
77 |
| - backend |
78 |
| - for backend in std.split($._config.storage_backend, ',') |
79 |
| - ], |
| 74 | + storage_backend: error 'must define storage_backend. valid entries: s3,gcs', |
80 | 75 |
|
81 | 76 | table_prefix: $._config.namespace,
|
82 | 77 | index_period_hours: 24, // 1 day
|
|
88 | 83 | topology_spread_max_skew: 1,
|
89 | 84 | },
|
90 | 85 |
|
91 |
| - // Bigtable variables |
92 |
| - bigtable_instance: error 'must specify bigtable instance', |
93 |
| - bigtable_project: error 'must specify bigtable project', |
94 |
| - |
95 | 86 | // GCS variables
|
96 | 87 | gcs_bucket_name: error 'must specify GCS bucket name',
|
97 | 88 |
|
98 |
| - // Cassandra variables |
99 |
| - cassandra_keyspace: 'lokiindex', |
100 |
| - cassandra_username: '', |
101 |
| - cassandra_password: '', |
102 |
| - cassandra_addresses: error 'must specify cassandra_addresses', |
103 |
| - |
104 | 89 | // S3 variables
|
105 | 90 | s3_access_key: '',
|
106 | 91 | s3_secret_access_key: '',
|
107 | 92 | s3_address: error 'must specify s3_address',
|
108 | 93 | s3_bucket_name: error 'must specify s3_bucket_name',
|
109 | 94 | s3_path_style: false,
|
110 | 95 |
|
111 |
| - // Dynamodb variables |
112 |
| - dynamodb_access_key: '', |
113 |
| - dynamodb_secret_access_key: '', |
114 |
| - dynamodb_region: error 'must specify dynamodb_region', |
| 96 | + // Azure variables |
| 97 | + azure_container_name: error 'must specify azure_container_name', |
| 98 | + azure_account_name: error 'must specify azure_account_name', |
| 99 | + azure_account_key: '', // secret access key, recommend setting this using environment variable |
115 | 100 |
|
116 | 101 | // DNS Resolver
|
117 | 102 | dns_resolver: 'kube-dns.kube-system.svc.cluster.local',
|
118 | 103 |
|
119 | 104 | client_configs: {
|
120 |
| - dynamo: { |
121 |
| - dynamodb: {} + if $._config.dynamodb_access_key != '' then { |
122 |
| - dynamodb_url: 'dynamodb://' + $._config.dynamodb_access_key + ':' + $._config.dynamodb_secret_access_key + '@' + $._config.dynamodb_region, |
123 |
| - } else { |
124 |
| - dynamodb_url: 'dynamodb://' + $._config.dynamodb_region, |
125 |
| - }, |
126 |
| - }, |
127 | 105 | s3: {
|
128 | 106 | s3forcepathstyle: $._config.s3_path_style,
|
129 | 107 | } + (
|
|
133 | 111 | s3: 's3://' + $._config.s3_address + '/' + $._config.s3_bucket_name,
|
134 | 112 | }
|
135 | 113 | ),
|
136 |
| - cassandra: { |
137 |
| - auth: false, |
138 |
| - addresses: $._config.cassandra_addresses, |
139 |
| - keyspace: $._config.cassandra_keyspace, |
140 |
| - } + ( |
141 |
| - if $._config.cassandra_username != '' then { |
142 |
| - auth: true, |
143 |
| - username: $._config.cassandra_username, |
144 |
| - password: $._config.cassandra_password, |
145 |
| - } else {} |
146 |
| - ), |
147 |
| - gcp: { |
148 |
| - instance: $._config.bigtable_instance, |
149 |
| - project: $._config.bigtable_project, |
150 |
| - }, |
151 | 114 | gcs: {
|
152 | 115 | bucket_name: $._config.gcs_bucket_name,
|
153 | 116 | },
|
| 117 | + azure: { |
| 118 | + container_name: $._config.azure_container_name, |
| 119 | + account_name: $._config.azure_account_name, |
| 120 | + } + ( |
| 121 | + if $._config.azure_account_key != '' then { |
| 122 | + account_key: $._config.azure_account_key, |
| 123 | + } else {} |
| 124 | + ), |
154 | 125 | },
|
155 | 126 |
|
156 | 127 | // December 11 is when we first launched to the public.
|
|
295 | 266 | remote_timeout: '1s',
|
296 | 267 | },
|
297 | 268 |
|
298 |
| - storage_config: { |
299 |
| - index_queries_cache_config: { |
300 |
| - memcached: { |
301 |
| - batch_size: 100, |
302 |
| - parallelism: 100, |
303 |
| - }, |
304 |
| - |
305 |
| - memcached_client: { |
306 |
| - host: 'memcached-index-queries.%s.svc.cluster.local' % $._config.namespace, |
307 |
| - service: 'memcached-client', |
308 |
| - consistent_hash: true, |
309 |
| - }, |
310 |
| - }, |
311 |
| - } + |
312 |
| - (if std.count($._config.enabledBackends, 'gcs') > 0 then { |
313 |
| - gcs: $._config.client_configs.gcs, |
314 |
| - } else {}) + |
315 |
| - (if std.count($._config.enabledBackends, 's3') > 0 then { |
316 |
| - aws+: $._config.client_configs.s3, |
317 |
| - } else {}) + |
318 |
| - (if std.count($._config.enabledBackends, 'bigtable') > 0 then { |
319 |
| - bigtable: $._config.client_configs.gcp, |
320 |
| - } else {}) + |
321 |
| - (if std.count($._config.enabledBackends, 'cassandra') > 0 then { |
322 |
| - cassandra: $._config.client_configs.cassandra, |
323 |
| - } else {}) + |
324 |
| - (if std.count($._config.enabledBackends, 'dynamodb') > 0 then { |
325 |
| - aws+: $._config.client_configs.dynamo, |
326 |
| - } else {}), |
| 269 | + storage_config: |
| 270 | + { |
| 271 | + index_queries_cache_config: { |
| 272 | + memcached: { |
| 273 | + batch_size: 100, |
| 274 | + parallelism: 100, |
| 275 | + }, |
| 276 | + memcached_client: { |
| 277 | + host: 'memcached-index-queries.%s.svc.cluster.local' % $._config.namespace, |
| 278 | + service: 'memcached-client', |
| 279 | + consistent_hash: true, |
| 280 | + }, |
| 281 | + }, |
| 282 | + } + ( |
| 283 | + if $._config.storage_backend == 'gcs' then { |
| 284 | + gcs: $._config.client_configs.gcs, |
| 285 | + } else {} |
| 286 | + ) + |
| 287 | + ( |
| 288 | + if $._config.storage_backend == 's3' then { |
| 289 | + aws: $._config.client_configs.s3, |
| 290 | + } else {} |
| 291 | + ) + |
| 292 | + ( |
| 293 | + if $._config.storage_backend == 'azure' then { |
| 294 | + azure: $._config.client_configs.azure, |
| 295 | + } else {} |
| 296 | + ), |
327 | 297 |
|
328 | 298 | chunk_store_config: {
|
329 | 299 | chunk_cache_config: {
|
|
340 | 310 | },
|
341 | 311 | },
|
342 | 312 |
|
343 |
| - // Default schema config is boltdb-shipper/gcs, this will need to be overridden for other stores |
344 | 313 | schema_config: {
|
345 | 314 | configs: [{
|
346 | 315 | from: '2020-10-24',
|
347 |
| - store: 'boltdb-shipper', |
348 |
| - object_store: 'gcs', |
349 |
| - schema: 'v11', |
| 316 | + store: 'tsdb', |
| 317 | + object_store: $._config.storage_backend, |
| 318 | + schema: 'v13', |
350 | 319 | index: {
|
351 | 320 | prefix: '%s_index_' % $._config.table_prefix,
|
352 | 321 | period: '%dh' % $._config.index_period_hours,
|
353 | 322 | },
|
354 | 323 | }],
|
355 | 324 | },
|
356 | 325 |
|
357 |
| - table_manager: { |
358 |
| - retention_period: 0, |
359 |
| - retention_deletes_enabled: false, |
360 |
| - poll_interval: '10m', |
361 |
| - creation_grace_period: '3h', |
362 |
| - }, |
363 |
| - |
364 | 326 | distributor: {
|
365 | 327 | // Creates a ring between distributors, required by the ingestion rate global limit.
|
366 | 328 | ring: {
|
|
0 commit comments