From db26b853246e8f213d25f8c5041893e54a556630 Mon Sep 17 00:00:00 2001 From: Anton Patsev <10828883+patsevanton@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:08:29 +0600 Subject: [PATCH] fix: conditionally set auto-offset-reset for snuba subscription consumers (#1538) --- .../snuba/deployment-snuba-subscription-consumer-events.yaml | 5 ++++- .../deployment-snuba-subscription-consumer-metrics.yaml | 5 ++++- .../deployment-snuba-subscription-consumer-transactions.yaml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-events.yaml b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-events.yaml index b85783f8a..f36de662f 100644 --- a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-events.yaml +++ b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-events.yaml @@ -72,7 +72,10 @@ spec: command: - "snuba" - "subscriptions-scheduler-executor" - - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerEvents.autoOffsetReset }}" + {{- if .Values.snuba.subscriptionConsumerEvents.autoOffsetReset }} + - "--auto-offset-reset" + - "{{ .Values.snuba.subscriptionConsumerEvents.autoOffsetReset }}" + {{- end }} - "--dataset=events" - "--entity=events" {{- if .Values.snuba.subscriptionConsumerEvents.noStrictOffsetReset }} diff --git a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-metrics.yaml b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-metrics.yaml index f722a220e..450a0b315 100644 --- a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-metrics.yaml +++ b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-metrics.yaml @@ -72,7 +72,10 @@ spec: command: - "snuba" - "subscriptions-scheduler-executor" - - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerMetrics.autoOffsetReset }}" + {{- if .Values.snuba.subscriptionConsumerMetrics.autoOffsetReset }} + - "--auto-offset-reset" + - "{{ .Values.snuba.subscriptionConsumerMetrics.autoOffsetReset }}" + {{- end }} - "--dataset=metrics" - "--entity=metrics_sets" - "--entity=metrics_counters" diff --git a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-transactions.yaml b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-transactions.yaml index 53942e9a4..1bce5163f 100644 --- a/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-transactions.yaml +++ b/charts/sentry/templates/snuba/deployment-snuba-subscription-consumer-transactions.yaml @@ -72,7 +72,10 @@ spec: command: - "snuba" - "subscriptions-scheduler-executor" - - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerTransactions.autoOffsetReset }}" + {{- if .Values.snuba.subscriptionConsumerTransactions.autoOffsetReset }} + - "--auto-offset-reset" + - "{{ .Values.snuba.subscriptionConsumerTransactions.autoOffsetReset }}" + {{- end }} - "--dataset=transactions" - "--entity=transactions" {{- if .Values.snuba.subscriptionConsumerTransactions.noStrictOffsetReset }}