Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit baff3b4

Browse files
committed
Add overrides to compactor
Signed-off-by: Goutham Veeramachaneni <[email protected]>
1 parent dda3e68 commit baff3b4

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* [CHANGE] Decreased `-server.grpc-max-concurrent-streams` from 100k to 10k. #369
2626
* [CHANGE] Decreased blocks storage ingesters graceful termination period from 80m to 20m. #369
2727
* [CHANGE] Changed default `job_names` for query-frontend, query-scheduler and querier to match custom deployments too. #376
28+
* [ENHANCEMENT] Add overrides config to compactor. This allows setting retention configs per user. #386
2829
* [ENHANCEMENT] cortex-mixin: Make `cluster_namespace_deployment:kube_pod_container_resource_requests_{cpu_cores,memory_bytes}:sum` backwards compatible with `kube-state-metrics` v2.0.0. #317
2930
* [ENHANCEMENT] Cortex-mixin: Include `cortex-gw-internal` naming variation in default `gateway` job names. #328
3031
* [ENHANCEMENT] Ruler dashboard: added object storage metrics. #354

cortex/config.libsonnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@
332332
// 300 rules
333333
ruler_max_rules_per_rule_group: 15,
334334
ruler_max_rule_groups_per_tenant: 20,
335+
336+
// No retention for now.
337+
compactor_blocks_retention_period: 0,
335338
},
336339

337340
medium_small_user:: {

cortex/tsdb.libsonnet

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@
159159
'compactor.ring.store': 'consul',
160160
'compactor.ring.consul.hostname': 'consul.%s.svc.cluster.local:8500' % $._config.namespace,
161161
'compactor.ring.prefix': '',
162+
163+
// Limits config.
164+
'runtime-config.file': '/etc/cortex/overrides.yaml',
165+
'compactor.blocks-retention-period': $._config.limits.compactor_blocks_retention_period,
162166
},
163167

164168
compactor_ports:: $.util.defaultPorts,
@@ -187,7 +191,8 @@
187191
// one by one. This does NOT affect rolling updates: they will continue to be
188192
// rolled out one by one (the next pod will be rolled out once the previous is
189193
// ready).
190-
statefulSet.mixin.spec.withPodManagementPolicy('Parallel'),
194+
statefulSet.mixin.spec.withPodManagementPolicy('Parallel') +
195+
$.util.configVolumeMount($._config.overrides_configmap, '/etc/cortex'),
191196

192197
compactor_statefulset:
193198
$.newCompactorStatefulSet('compactor', $.compactor_container),

0 commit comments

Comments
 (0)