From d0bedebf5da358cf8517f6a933767f4affc6927c Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Mon, 23 Aug 2021 17:32:48 +0200 Subject: [PATCH] Added function to create query-scheduler deployment Signed-off-by: Marco Pracucci --- cortex/query-scheduler.libsonnet | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cortex/query-scheduler.libsonnet b/cortex/query-scheduler.libsonnet index 531bb1c3..130325e2 100644 --- a/cortex/query-scheduler.libsonnet +++ b/cortex/query-scheduler.libsonnet @@ -22,12 +22,14 @@ $.util.resourcesRequests('2', '1Gi') + $.util.resourcesLimits(null, '2Gi'), - - query_scheduler_deployment: if !$._config.query_scheduler_enabled then {} else - deployment.new('query-scheduler', 2, [$.query_scheduler_container]) + + newQuerySchedulerDeployment(name, container):: + deployment.new(name, 2, [container]) + $.util.configVolumeMount('overrides', '/etc/cortex') + $.util.antiAffinity, + query_scheduler_deployment: if !$._config.query_scheduler_enabled then {} else + self.newQuerySchedulerDeployment('query-scheduler', $.query_scheduler_container), + query_scheduler_service: if !$._config.query_scheduler_enabled then {} else $.util.serviceFor($.query_scheduler_deployment),