Skip to content

Commit 6fedb04

Browse files
authored
feat(jsonnet): Add queryUrl support (#330)
Signed-off-by: adinhodovic <[email protected]>
1 parent a28d8ac commit 6fedb04

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel
3333
- [#308](https://github.com/thanos-io/kube-thanos/pull/308) Recive: add store limits flags
3434
- [#310](https://github.com/thanos-io/kube-thanos/pull/310) Ruler: Add host anti-affinity to ruler
3535
- [#313](https://github.com/thanos-io/kube-thanos/pull/313) Add per-container SecurityContext
36+
- [#330](https://github.com/thanos-io/kube-thanos/pull/330) Query: Add query url support to jsonnet library
3637

3738
### Fixed
3839

jsonnet/kube-thanos/kube-thanos-query-frontend.libsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ local defaults = {
2121
},
2222
},
2323
queryRangeCache: {},
24+
queryUrl: '',
2425
labelsCache: {},
2526
logLevel: 'info',
2627
logFormat: 'logfmt',
@@ -187,6 +188,10 @@ function(params) {
187188
{ config+: { service_name: defaults.name } } + tqf.config.tracing
188189
),
189190
] else []
191+
) + (
192+
if tqf.config.queryUrl != '' then [
193+
'--alert.query-url=' + tqf.config.queryUrl,
194+
] else []
190195
),
191196
env: [
192197
{

jsonnet/kube-thanos/kube-thanos-query.libsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ local defaults = {
1313
stores: ['dnssrv+_grpc._tcp.thanos-store.%s.svc.cluster.local' % defaults.namespace],
1414
rules: [], // TODO(bwplotka): This is deprecated, switch to endpoints while ready.
1515
externalPrefix: '',
16+
queryUrl: '',
1617
prefixHeader: '',
1718
autoDownsampling: true,
1819
useThanosEngine: false,
@@ -186,6 +187,10 @@ function(params) {
186187
'--query.telemetry.request-series-seconds-quantiles=' + std.stripChars(quantile, ' ')
187188
for quantile in std.split(tq.config.telemetrySeriesQuantiles, ',')
188189
] else []
190+
) + (
191+
if tq.config.queryUrl != '' then [
192+
'--alert.query-url=' + tq.config.queryUrl,
193+
] else []
189194
),
190195
env: [
191196
{

0 commit comments

Comments
 (0)