Skip to content

Commit ddcbedf

Browse files
author
Jonathan Chauncey
authored
Merge pull request #121 from jchauncey/create-topic
fix(telegraf): Create nsq topic at startup
2 parents 1305cb8 + 9dae9cc commit ddcbedf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

telegraf/rootfs/start-telegraf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/sh
22
set -e
33

4+
if [ -n $DEIS_NSQD_SERVICE_HOST ]; then
5+
echo "Creating topic with URL: http://$DEIS_NSQD_SERVICE_HOST:$DEIS_NSQD_SERVICE_PORT/topic/create?topic=$NSQ_CONSUMER_TOPIC"
6+
curl -s -X POST http://$DEIS_NSQD_SERVICE_HOST:$DEIS_NSQD_SERVICE_PORT/topic/create?topic=$NSQ_CONSUMER_TOPIC
7+
fi
8+
49
export PROMETHEUS_BEARER_TOKEN=/var/run/secrets/kubernetes.io/serviceaccount/token
510
if [ -f $PROMETHEUS_BEARER_TOKEN ]; then
611
export TOKEN=$(cat $PROMETHEUS_BEARER_TOKEN)

0 commit comments

Comments
 (0)