Skip to content

Commit

Permalink
add if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
wedamija committed Jun 3, 2024
1 parent 0bfbda5 commit d5c516f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion install/create-kafka-topics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ done

# This topic must have only a single partition for the consumer to work correctly
# https://github.com/getsentry/ops/blob/7dbc26f39c584ec924c8fef2ad5c532d6a158be3/k8s/clusters/us/_topicctl.yaml#L288-L295
$dc exec kafka kafka-topics --create --topic monitors-clock-tick --bootstrap-server kafka:9092 --partitions 1

if ! echo "$EXISTING_KAFKA_TOPICS" | grep -qE "(^| )monitors-clock-tick( |$)"; then
$dc exec kafka kafka-topics --create --topic monitors-clock-tick --bootstrap-server kafka:9092 --partitions 1
fi

echo "${_endgroup}"

0 comments on commit d5c516f

Please sign in to comment.