From 23a7ad238c24b88c2fbcdafcc9469c87f23b5446 Mon Sep 17 00:00:00 2001 From: Sandeep Sukhani Date: Fri, 12 Feb 2021 11:40:21 +0530 Subject: [PATCH] fix config for statefulset rulers when using boltdb-shipper --- production/ksonnet/loki/boltdb_shipper.libsonnet | 1 - production/ksonnet/loki/ruler.libsonnet | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/production/ksonnet/loki/boltdb_shipper.libsonnet b/production/ksonnet/loki/boltdb_shipper.libsonnet index a173fc4b9498..4c9955b4d1a9 100644 --- a/production/ksonnet/loki/boltdb_shipper.libsonnet +++ b/production/ksonnet/loki/boltdb_shipper.libsonnet @@ -10,7 +10,6 @@ // run ingesters and queriers as statefulsets when using boltdb-shipper to avoid using node disk for storing the index. stateful_ingesters: if self.using_boltdb_shipper then true else super.stateful_ingesters, stateful_queriers: if self.using_boltdb_shipper then true else super.stateful_queriers, - stateful_rulers: if self.using_boltdb_shipper then true else super.stateful_rulers, boltdb_shipper_shared_store: error 'must define boltdb_shipper_shared_store when using_boltdb_shipper=true. If this is not intentional, consider disabling it. boltdb_shipper_shared_store is a backend key from the storage_config, such as (gcs) or (s3)', compactor_pvc_size: '10Gi', diff --git a/production/ksonnet/loki/ruler.libsonnet b/production/ksonnet/loki/ruler.libsonnet index 23298ab8121f..8076ea56eeaa 100644 --- a/production/ksonnet/loki/ruler.libsonnet +++ b/production/ksonnet/loki/ruler.libsonnet @@ -7,6 +7,14 @@ ruler_args:: $._config.commonArgs { target: 'ruler', + } + if $._config.using_boltdb_shipper then { + // Use PVC for caching + 'boltdb.shipper.cache-location': '/data/boltdb-cache', + } else {}, + + _config+:: { + // run rulers as statefulsets when using boltdb-shipper to avoid using node disk for storing the index. + stateful_rulers: if self.using_boltdb_shipper then true else super.stateful_rulers, }, ruler_container::