From 78a74a03f70b73ac0f832624134c5350440364a0 Mon Sep 17 00:00:00 2001 From: Donny Xia Date: Thu, 23 Jan 2025 10:25:10 -0800 Subject: [PATCH] Add some new flags for query and query frontend --- CHANGELOG.md | 1 + jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet | 4 ++++ jsonnet/kube-thanos/kube-thanos-query.libsonnet | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d59a8..16b08d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#308](https://github.com/thanos-io/kube-thanos/pull/308) Recive: add store limits flags - [#310](https://github.com/thanos-io/kube-thanos/pull/310) Ruler: Add host anti-affinity to ruler - [#313](https://github.com/thanos-io/kube-thanos/pull/313) Add per-container SecurityContext +- [#329](https://github.com/thanos-io/kube-thanos/pull/329) Query: Add some new flags for query and query frontend ### Fixed diff --git a/jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet b/jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet index de64aa8..66a8438 100644 --- a/jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet @@ -31,6 +31,8 @@ local defaults = { }, tracing: {}, extraEnv: [], + labelsMaxQueryParallelism: 14, + queryRangeMaxQueryParallelism: 14, memcachedDefaults+:: { config+: { @@ -169,6 +171,8 @@ function(params) { '--query-range.max-retries-per-request=%d' % tqf.config.maxRetries, '--labels.max-retries-per-request=%d' % tqf.config.maxRetries, '--query-frontend.log-queries-longer-than=%s' % tqf.config.logQueriesLongerThan, + '--labels.max-query-parallelism=%d' % tqf.config.labelsMaxQueryParallelism, + '--query-range.max-query-parallelism=%d' % tqf.config.queryRangeMaxQueryParallelism, ] + ( if std.length(tqf.config.queryRangeCache) > 0 then [ '--query-range.response-cache-config=' + std.manifestYamlDoc( diff --git a/jsonnet/kube-thanos/kube-thanos-query.libsonnet b/jsonnet/kube-thanos/kube-thanos-query.libsonnet index 973b062..940ca6b 100644 --- a/jsonnet/kube-thanos/kube-thanos-query.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-query.libsonnet @@ -19,6 +19,8 @@ local defaults = { resources: {}, queryTimeout: '', lookbackDelta: '', + maxConcurrent: 20, + maxConcurrentSelect: 4, ports: { grpc: 10901, http: 9090, @@ -128,6 +130,8 @@ function(params) { '--http-address=0.0.0.0:%d' % tq.config.ports.http, '--log.level=' + tq.config.logLevel, '--log.format=' + tq.config.logFormat, + '--query.max-concurrent=%d' % tq.config.maxConcurrent, + '--query.max-concurrent-select=%d' % tq.config.maxConcurrentSelect, ] + [ '--query.replica-label=%s' % labelName for labelName in tq.config.replicaLabels