Skip to content

chore(ksonnet)!: clean-up deprecated configs #16007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 44 additions & 82 deletions production/ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@
sharded_queries_enabled: false,
},

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

enabledBackends: [
backend
for backend in std.split($._config.storage_backend, ',')
],
storage_backend: error 'must define storage_backend. valid entries: s3,gcs',

table_prefix: $._config.namespace,
index_period_hours: 24, // 1 day
Expand All @@ -88,42 +83,25 @@
topology_spread_max_skew: 1,
},

// Bigtable variables
bigtable_instance: error 'must specify bigtable instance',
bigtable_project: error 'must specify bigtable project',

// GCS variables
gcs_bucket_name: error 'must specify GCS bucket name',

// Cassandra variables
cassandra_keyspace: 'lokiindex',
cassandra_username: '',
cassandra_password: '',
cassandra_addresses: error 'must specify cassandra_addresses',

// S3 variables
s3_access_key: '',
s3_secret_access_key: '',
s3_address: error 'must specify s3_address',
s3_bucket_name: error 'must specify s3_bucket_name',
s3_path_style: false,

// Dynamodb variables
dynamodb_access_key: '',
dynamodb_secret_access_key: '',
dynamodb_region: error 'must specify dynamodb_region',
// Azure variables
azure_container_name: error 'must specify azure_container_name',
azure_account_name: error 'must specify azure_account_name',
azure_account_key: '', // secret access key, recommend setting this using environment variable

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

client_configs: {
dynamo: {
dynamodb: {} + if $._config.dynamodb_access_key != '' then {
dynamodb_url: 'dynamodb://' + $._config.dynamodb_access_key + ':' + $._config.dynamodb_secret_access_key + '@' + $._config.dynamodb_region,
} else {
dynamodb_url: 'dynamodb://' + $._config.dynamodb_region,
},
},
s3: {
s3forcepathstyle: $._config.s3_path_style,
} + (
Expand All @@ -133,24 +111,17 @@
s3: 's3://' + $._config.s3_address + '/' + $._config.s3_bucket_name,
}
),
cassandra: {
auth: false,
addresses: $._config.cassandra_addresses,
keyspace: $._config.cassandra_keyspace,
} + (
if $._config.cassandra_username != '' then {
auth: true,
username: $._config.cassandra_username,
password: $._config.cassandra_password,
} else {}
),
gcp: {
instance: $._config.bigtable_instance,
project: $._config.bigtable_project,
},
gcs: {
bucket_name: $._config.gcs_bucket_name,
},
azure: {
container_name: $._config.azure_container_name,
account_name: $._config.azure_account_name,
} + (
if $._config.azure_account_key != '' then {
account_key: $._config.azure_account_key,
} else {}
),
},

// December 11 is when we first launched to the public.
Expand Down Expand Up @@ -295,35 +266,34 @@
remote_timeout: '1s',
},

storage_config: {
index_queries_cache_config: {
memcached: {
batch_size: 100,
parallelism: 100,
},

memcached_client: {
host: 'memcached-index-queries.%s.svc.cluster.local' % $._config.namespace,
service: 'memcached-client',
consistent_hash: true,
},
},
} +
(if std.count($._config.enabledBackends, 'gcs') > 0 then {
gcs: $._config.client_configs.gcs,
} else {}) +
(if std.count($._config.enabledBackends, 's3') > 0 then {
aws+: $._config.client_configs.s3,
} else {}) +
(if std.count($._config.enabledBackends, 'bigtable') > 0 then {
bigtable: $._config.client_configs.gcp,
} else {}) +
(if std.count($._config.enabledBackends, 'cassandra') > 0 then {
cassandra: $._config.client_configs.cassandra,
} else {}) +
(if std.count($._config.enabledBackends, 'dynamodb') > 0 then {
aws+: $._config.client_configs.dynamo,
} else {}),
storage_config:
{
index_queries_cache_config: {
memcached: {
batch_size: 100,
parallelism: 100,
},
memcached_client: {
host: 'memcached-index-queries.%s.svc.cluster.local' % $._config.namespace,
service: 'memcached-client',
consistent_hash: true,
},
},
} + (
if $._config.storage_backend == 'gcs' then {
gcs: $._config.client_configs.gcs,
} else {}
) +
(
if $._config.storage_backend == 's3' then {
aws: $._config.client_configs.s3,
} else {}
) +
(
if $._config.storage_backend == 'azure' then {
azure: $._config.client_configs.azure,
} else {}
),

chunk_store_config: {
chunk_cache_config: {
Expand All @@ -340,27 +310,19 @@
},
},

// Default schema config is boltdb-shipper/gcs, this will need to be overridden for other stores
schema_config: {
configs: [{
from: '2020-10-24',
store: 'boltdb-shipper',
object_store: 'gcs',
schema: 'v11',
store: 'tsdb',
object_store: $._config.storage_backend,
schema: 'v13',
index: {
prefix: '%s_index_' % $._config.table_prefix,
period: '%dh' % $._config.index_period_hours,
},
}],
},

table_manager: {
retention_period: 0,
retention_deletes_enabled: false,
poll_interval: '10m',
creation_grace_period: '3h',
},

distributor: {
// Creates a ring between distributors, required by the ingestion rate global limit.
ring: {
Expand Down
1 change: 0 additions & 1 deletion production/ksonnet/loki/images.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
ingester:: self.loki,
pattern_ingester:: self.loki,
querier:: self.loki,
tableManager:: self.loki,
query_frontend:: self.loki,
query_scheduler:: self.loki,
ruler:: self.loki,
Expand Down
2 changes: 0 additions & 2 deletions production/ksonnet/loki/loki.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
// BoltDB and TSDB Shipper support. Anything that modifies the compactor must be imported after this.
(import 'shipper.libsonnet') +

(import 'table-manager.libsonnet') +

// Multi-zone ingester related config
(import 'multi-zone.libsonnet') +

Expand Down
49 changes: 0 additions & 49 deletions production/ksonnet/loki/table-manager.libsonnet

This file was deleted.