Skip to content

Commit 650a08b

Browse files
authored
receive: add store limits flags (#308)
* add store limits flags Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> * update changelog Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> --------- Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com>
1 parent dfc278d commit 650a08b

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
@@ -30,6 +30,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel
3030
- [#299](https://github.com/thanos-io/kube-thanos/pull/299) Query: allow configuration of telemetry.request options
3131
- [#301](https://github.com/thanos-io/kube-thanos/pull/301) Receive: allow configuration of `minReadySeconds` for StatefulSet
3232
- [#305](https://github.com/thanos-io/kube-thanos/pull/305) Receive: allow configuration of limits-config-file
33+
- [#308](https://github.com/thanos-io/kube-thanos/pull/308) Recive: add store limits flags
3334

3435
### Fixed
3536

jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
clusterDomain: 'cluster.local',
3737
extraEnv: [],
3838
receiveLimitsConfigFile: {},
39+
storeLimits: {},
3940

4041
commonLabels:: {
4142
'app.kubernetes.io/name': 'thanos-receive',

jsonnet/kube-thanos/kube-thanos-receive.libsonnet

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function(params) {
1414
assert !std.objectHas(tr.config.volumeClaimTemplate, 'spec') || std.assertEqual(tr.config.volumeClaimTemplate.spec.accessModes, ['ReadWriteOnce']) : 'thanos receive PVC accessMode can only be ReadWriteOnce',
1515
assert std.isNumber(tr.config.minReadySeconds),
1616
assert std.isObject(tr.config.receiveLimitsConfigFile),
17+
assert std.isObject(tr.config.storeLimits),
1718

1819
service: {
1920
apiVersion: 'v1',
@@ -95,6 +96,14 @@ function(params) {
9596
if tr.config.hashringConfigMapName != '' then [
9697
'--receive.hashrings-file=/var/lib/thanos-receive/hashrings.json',
9798
] else []
99+
) + (
100+
if std.objectHas(tr.config.storeLimits, 'requestSamples') then [
101+
'--store.limits.request-samples=%d' % tr.config.storeLimits.requestSamples,
102+
] else []
103+
) + (
104+
if std.objectHas(tr.config.storeLimits, 'requestSeries') then [
105+
'--store.limits.request-series=%d' % tr.config.storeLimits.requestSeries,
106+
] else []
98107
) + (
99108
if std.length(tr.config.tracing) > 0 then [
100109
'--tracing.config=' + std.manifestYamlDoc(

0 commit comments

Comments
 (0)