From eb5bfce6df73e9a3bca85db9658460bb9ec9e250 Mon Sep 17 00:00:00 2001 From: Moad Zardab Date: Wed, 4 Oct 2023 11:17:07 +0100 Subject: [PATCH] Adding store.limits for Receive pods in base template (#615) Signed-off-by: mzardab --- resources/services/observatorium-metrics-template.yaml | 6 ++++++ .../observatorium-metrics-template-overwrites.libsonnet | 2 ++ services/observatorium-metrics-template.jsonnet | 2 ++ 3 files changed, 10 insertions(+) diff --git a/resources/services/observatorium-metrics-template.yaml b/resources/services/observatorium-metrics-template.yaml index 25623d5372..14c8588ad0 100644 --- a/resources/services/observatorium-metrics-template.yaml +++ b/resources/services/observatorium-metrics-template.yaml @@ -2085,6 +2085,8 @@ objects: - --receive.grpc-compression=none - --receive.hashrings-algorithm=${THANOS_RECEIVE_HASHRINGS_ALGORITHM} - --receive.hashrings-file-refresh-interval=5s + - --store.limits.request-series=${THANOS_RECEIVE_REQUEST_SERIES_LIMIT} + - --store.limits.request-samples=${THANOS_RECEIVE_REQUEST_SAMPLES_LIMIT} env: - name: NAME valueFrom: @@ -4752,6 +4754,10 @@ parameters: value: hashmod - name: THANOS_RECEIVE_LIMIT_CONFIG value: '{"write":{"default":{"request":{"samples_limit":0,"series_limit":0,"size_bytes_limit":0}},"global":{"max_concurrency":0}}}' +- name: THANOS_RECEIVE_REQUEST_SERIES_LIMIT + value: "0" +- name: THANOS_RECEIVE_REQUEST_SAMPLES_LIMIT + value: "0" - name: THANOS_RULE_SYNCER_IMAGE value: quay.io/observatorium/thanos-rule-syncer - name: THANOS_RULE_SYNCER_IMAGE_TAG diff --git a/services/observatorium-metrics-template-overwrites.libsonnet b/services/observatorium-metrics-template-overwrites.libsonnet index 5df360458b..0e73c9eaee 100644 --- a/services/observatorium-metrics-template-overwrites.libsonnet +++ b/services/observatorium-metrics-template-overwrites.libsonnet @@ -458,6 +458,8 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet'; '--receive.grpc-compression=none', '--receive.hashrings-algorithm=${THANOS_RECEIVE_HASHRINGS_ALGORITHM}', '--receive.hashrings-file-refresh-interval=5s', + '--store.limits.request-series=${THANOS_RECEIVE_REQUEST_SERIES_LIMIT}', + '--store.limits.request-samples=${THANOS_RECEIVE_REQUEST_SAMPLES_LIMIT}', ], env+: s3EnvVars + [{ name: 'DEBUG', diff --git a/services/observatorium-metrics-template.jsonnet b/services/observatorium-metrics-template.jsonnet index 0b8ff29513..03fac6a7e5 100644 --- a/services/observatorium-metrics-template.jsonnet +++ b/services/observatorium-metrics-template.jsonnet @@ -119,6 +119,8 @@ local obs = import 'observatorium.libsonnet'; { name: 'THANOS_RECEIVE_HASHRING_SERVICE_NAME', value: 'observatorium-thanos-receive-default' }, { name: 'THANOS_RECEIVE_HASHRINGS_ALGORITHM', value: 'hashmod' }, { name: 'THANOS_RECEIVE_LIMIT_CONFIG', value: std.manifestJsonMinified(defaultReceiveLimits) }, + { name: 'THANOS_RECEIVE_REQUEST_SERIES_LIMIT', value: '0' }, + { name: 'THANOS_RECEIVE_REQUEST_SAMPLES_LIMIT', value: '0' }, { name: 'THANOS_RULE_SYNCER_IMAGE', value: 'quay.io/observatorium/thanos-rule-syncer' }, { name: 'THANOS_RULE_SYNCER_IMAGE_TAG', value: 'main-2022-09-14-338f9ec' }, { name: 'THANOS_RULER_CPU_LIMIT', value: '1' },