Skip to content

Commit

Permalink
fix: add topic partition counts in snuba config for correct (#1489)
Browse files Browse the repository at this point in the history
provisioning
  • Loading branch information
MemberIT authored Sep 30, 2024
1 parent 34d4975 commit 2b44fb2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/sentry/templates/snuba/_helper-snuba.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ settings.py: |

DEBUG = env("DEBUG", "0").lower() in ("1", "true")

{{- if .Values.kafka.enabled -}}
{{ if .Values.kafka.provisioning.enabled }}

# Set partition counts for provisioning topics from kafka chart.
TOPIC_PARTITION_COUNTS = {
{{- $numPartitions := .Values.kafka.provisioning.numPartitions -}}
{{- range .Values.kafka.provisioning.topics }}
{{ .name | quote }}: {{ default $numPartitions .partitions }},
{{- end }}
}
{{- end -}}
{{- end }}

# Clickhouse Options
CLUSTERS = [
{
Expand Down
5 changes: 5 additions & 0 deletions charts/sentry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1925,11 +1925,16 @@ kafka:
# Topic list is based on files below.
# - https://github.com/getsentry/snuba/blob/master/snuba/utils/streams/topics.py
# - https://github.com/getsentry/self-hosted/blob/master/install/create-kafka-topics.sh#L6
## Default number of partitions for topics when unspecified
##
# numPartitions: 1
# Note that snuba component might fail if you set `hooks.snubaInit.kafka.enabled` to `false` and remove the topics from this default topic list.
topics:
- name: events
config:
"message.timestamp.type": LogAppendTime
## Number of partitions for this topic
# partitions: 1
- name: event-replacements
- name: snuba-commit-log
config:
Expand Down

0 comments on commit 2b44fb2

Please sign in to comment.