Skip to content

Commit 76183fa

Browse files
authored
chore(ksonnet)!: clean-up deprecated configs (#16007)
1 parent d2b7d82 commit 76183fa

File tree

4 files changed

+44
-134
lines changed

4 files changed

+44
-134
lines changed

‎production/ksonnet/loki/config.libsonnet

Lines changed: 44 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,7 @@
7171
sharded_queries_enabled: false,
7272
},
7373

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',
8075

8176
table_prefix: $._config.namespace,
8277
index_period_hours: 24, // 1 day
@@ -88,42 +83,25 @@
8883
topology_spread_max_skew: 1,
8984
},
9085

91-
// Bigtable variables
92-
bigtable_instance: error 'must specify bigtable instance',
93-
bigtable_project: error 'must specify bigtable project',
94-
9586
// GCS variables
9687
gcs_bucket_name: error 'must specify GCS bucket name',
9788

98-
// Cassandra variables
99-
cassandra_keyspace: 'lokiindex',
100-
cassandra_username: '',
101-
cassandra_password: '',
102-
cassandra_addresses: error 'must specify cassandra_addresses',
103-
10489
// S3 variables
10590
s3_access_key: '',
10691
s3_secret_access_key: '',
10792
s3_address: error 'must specify s3_address',
10893
s3_bucket_name: error 'must specify s3_bucket_name',
10994
s3_path_style: false,
11095

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
115100

116101
// DNS Resolver
117102
dns_resolver: 'kube-dns.kube-system.svc.cluster.local',
118103

119104
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-
},
127105
s3: {
128106
s3forcepathstyle: $._config.s3_path_style,
129107
} + (
@@ -133,24 +111,17 @@
133111
s3: 's3://' + $._config.s3_address + '/' + $._config.s3_bucket_name,
134112
}
135113
),
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-
},
151114
gcs: {
152115
bucket_name: $._config.gcs_bucket_name,
153116
},
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+
),
154125
},
155126

156127
// December 11 is when we first launched to the public.
@@ -295,35 +266,34 @@
295266
remote_timeout: '1s',
296267
},
297268

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+
),
327297

328298
chunk_store_config: {
329299
chunk_cache_config: {
@@ -340,27 +310,19 @@
340310
},
341311
},
342312

343-
// Default schema config is boltdb-shipper/gcs, this will need to be overridden for other stores
344313
schema_config: {
345314
configs: [{
346315
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',
350319
index: {
351320
prefix: '%s_index_' % $._config.table_prefix,
352321
period: '%dh' % $._config.index_period_hours,
353322
},
354323
}],
355324
},
356325

357-
table_manager: {
358-
retention_period: 0,
359-
retention_deletes_enabled: false,
360-
poll_interval: '10m',
361-
creation_grace_period: '3h',
362-
},
363-
364326
distributor: {
365327
// Creates a ring between distributors, required by the ingestion rate global limit.
366328
ring: {

‎production/ksonnet/loki/images.libsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
ingester:: self.loki,
1111
pattern_ingester:: self.loki,
1212
querier:: self.loki,
13-
tableManager:: self.loki,
1413
query_frontend:: self.loki,
1514
query_scheduler:: self.loki,
1615
ruler:: self.loki,

‎production/ksonnet/loki/loki.libsonnet

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
// BoltDB and TSDB Shipper support. Anything that modifies the compactor must be imported after this.
2727
(import 'shipper.libsonnet') +
2828

29-
(import 'table-manager.libsonnet') +
30-
3129
// Multi-zone ingester related config
3230
(import 'multi-zone.libsonnet') +
3331

‎production/ksonnet/loki/table-manager.libsonnet

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)