From 7c6cbc21aaae411eb593cddc0a7edf84edc0dc89 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Mon, 16 Mar 2020 14:33:08 +0100 Subject: [PATCH] Enable global limits by default in production mixin (#1807) Signed-off-by: Marco Pracucci --- production/ksonnet/loki/config.libsonnet | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/production/ksonnet/loki/config.libsonnet b/production/ksonnet/loki/config.libsonnet index 83ef4a79c42f1..a19e5248e5145 100644 --- a/production/ksonnet/loki/config.libsonnet +++ b/production/ksonnet/loki/config.libsonnet @@ -91,10 +91,6 @@ 'limits.per-user-override-config': '/etc/loki/overrides/overrides.yaml', }, - // Global limits are currently opt-in only. - max_streams_global_limit_enabled: false, - ingestion_rate_global_limit_enabled: false, - loki: { server: { graceful_shutdown_timeout: '5s', @@ -141,10 +137,8 @@ reject_old_samples: true, reject_old_samples_max_age: '168h', max_query_length: '12000h', // 500 days - } + if !$._config.max_streams_global_limit_enabled then {} else { - max_streams_per_user: 0, + max_streams_per_user: 0, // Disabled in favor of the global limit max_global_streams_per_user: 10000, // 10k - } + if !$._config.ingestion_rate_global_limit_enabled then {} else { ingestion_rate_strategy: 'global', ingestion_rate_mb: 10, ingestion_burst_size_mb: 20, @@ -274,7 +268,6 @@ }, }, - } + if !$._config.ingestion_rate_global_limit_enabled then {} else { distributor: { // Creates a ring between distributors, required by the ingestion rate global limit. ring: {