Skip to content
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

Add table manager and refer to master #63

Merged
merged 1 commit into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
s3_bucket_name: error 'must specify S3 bucket name',

// December 11 is when we first launched to the public.
schema_start_date: '0',
schema_start_date: '2018-12-11',

server_config: {
http_listen_port: 80,
Expand Down Expand Up @@ -79,7 +79,7 @@
object_store: 'gcs',
schema: 'v9',
index: {
prefix: 'prefix_',
prefix: '%s_index_' % $._config.table_prefix,
period: '168h',
},
}],
Expand Down
5 changes: 2 additions & 3 deletions ksonnet/loki/images.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
memcachedExporter: 'prom/memcached-exporter:v0.4.1',

// Our services.
cortex_gw: 'raintank/cortex-gw:0.9.0-93-gceff250',
tableManager: 'grafana/cortex-table-manager:r45-6247bbc8',
tableManager: 'grafana/cortex-table-manager:r47-06f3294e',

loki: 'grafana/loki:master-d5e6c60',
loki: 'grafana/loki:master',

distributor: self.loki,
ingester: self.loki,
Expand Down
3 changes: 2 additions & 1 deletion ksonnet/loki/loki.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
// Cortex services
(import 'distributor.libsonnet') +
(import 'ingester.libsonnet') +
(import 'querier.libsonnet')
(import 'querier.libsonnet') +
(import 'table-manager.libsonnet')
41 changes: 41 additions & 0 deletions ksonnet/loki/table-manager.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
local container = $.core.v1.container,

table_manager_args:: {
'bigtable.project': $._config.bigtable_project,
'bigtable.instance': $._config.bigtable_instance,
'chunk.storage-client': $._config.storage_backend,

'dynamodb.original-table-name': '%s_index' % $._config.table_prefix,
'dynamodb.use-periodic-tables': true,
'dynamodb.periodic-table.prefix': '%s_index_' % $._config.table_prefix,
'dynamodb.chunk-table.prefix': '%s_chunks_' % $._config.table_prefix,
'dynamodb.periodic-table.from': $._config.schema_start_date,
'dynamodb.chunk-table.from': $._config.schema_start_date,
'dynamodb.v9-schema-from': $._config.schema_start_date,
// Cassandra / BigTable doesn't use these fields, so set them to zero
'dynamodb.chunk-table.inactive-read-throughput': 0,
'dynamodb.chunk-table.inactive-write-throughput': 0,
'dynamodb.chunk-table.read-throughput': 0,
'dynamodb.chunk-table.write-throughput': 0,
'dynamodb.periodic-table.inactive-read-throughput': 0,
'dynamodb.periodic-table.inactive-write-throughput': 0,
'dynamodb.periodic-table.read-throughput': 0,
'dynamodb.periodic-table.write-throughput': 0,
},

table_manager_container::
container.new('table-manager', $._images.tableManager) +
container.withPorts($.util.defaultPorts) +
container.withArgsMixin($.util.mapToFlags($.table_manager_args)) +
$.util.resourcesRequests('100m', '100Mi') +
$.util.resourcesLimits('200m', '200Mi'),

local deployment = $.apps.v1beta1.deployment,

table_manager_deployment:
deployment.new('table-manager', 1, [$.table_manager_container]),

table_manager_service:
$.util.serviceFor($.table_manager_deployment),
}
2 changes: 1 addition & 1 deletion ksonnet/promtail/promtail.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local k = import 'ksonnet-util/kausal.libsonnet';

k {
_images+:: {
promtail: 'grafana/promtail:master-5da1fde',
promtail: 'grafana/promtail:master',
},

_config+:: {
Expand Down
2 changes: 1 addition & 1 deletion tools/promtail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: grafana/promtail:master-5da1fde
image: grafana/promtail:master
imagePullPolicy: IfNotPresent
name: promtail
ports:
Expand Down