Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
5a25204f2f
|
|||
52b414f60f
|
|||
3fc83eefe6
|
@ -4,7 +4,7 @@ PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalance
|
|||||||
PGPASSWORD=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGPASSWORD}" | base64 --decode`
|
PGPASSWORD=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGPASSWORD}" | base64 --decode`
|
||||||
PGUSER=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGUSER}" | base64 --decode`
|
PGUSER=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGUSER}" | base64 --decode`
|
||||||
PGSSLMODE=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGSSLMODE}" | base64 --decode`
|
PGSSLMODE=`kubectl get secrets ma-db-cred -n $N -o jsonpath="{.data.PGSSLMODE}" | base64 --decode`
|
||||||
PGDATABASE="ma"
|
PGDATABASE="matest"
|
||||||
export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE
|
export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE
|
||||||
|
|
||||||
MA_CONF=`cat config-test.json`
|
MA_CONF=`cat config-test.json`
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export PGUSER=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-username}" | base64 --decode`
|
. ~/Workspace/mykubernetesenv/ENVDB1
|
||||||
export PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
|
|
||||||
export PGPASSWORD=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-password}" | base64 --decode`
|
|
||||||
export PGSSLMODE=require
|
|
||||||
|
|
||||||
|
|
||||||
DATABASE=ma
|
DATABASE=ma
|
||||||
LOGIN=ma
|
LOGIN=ma
|
||||||
@ -33,7 +29,7 @@ kubectl create secret generic ma-db-cred \
|
|||||||
--from-literal=PGUSER="$LOGIN" \
|
--from-literal=PGUSER="$LOGIN" \
|
||||||
--from-literal=PGPASSWORD="$PASSWORD" \
|
--from-literal=PGPASSWORD="$PASSWORD" \
|
||||||
--from-literal=PGDATABASE="$DATABASE" \
|
--from-literal=PGDATABASE="$DATABASE" \
|
||||||
--from-literal=PGHOST="timescaledb.database.svc.cluster.local" \
|
--from-literal=PGHOST="database.database1.svc.cluster.local" \
|
||||||
--from-literal=PGSSLMODE="require" | \
|
--from-literal=PGSSLMODE="require" | \
|
||||||
kubectl apply -f - -n $NAMESPACE
|
kubectl apply -f - -n $NAMESPACE
|
||||||
|
|
||||||
|
@ -122,7 +122,9 @@ func StartMqttClient() {
|
|||||||
if token := mqttClient.Connect(); token.Wait() && token.Error() != nil {
|
if token := mqttClient.Connect(); token.Wait() && token.Error() != nil {
|
||||||
log.Fatalf("Unable to connect to broker %s, error %s", broker, token.Error())
|
log.Fatalf("Unable to connect to broker %s, error %s", broker, token.Error())
|
||||||
}
|
}
|
||||||
//log.Printf("Successfully connected to broker %s", broker)
|
log.Printf("Successfully connected to broker %s", broker)
|
||||||
|
log.Printf("Include topics: %s", config.Config.IncludeTopics)
|
||||||
|
log.Printf("Exclude topics: %s", config.Config.ExcludeTopics)
|
||||||
|
|
||||||
go outputDispatcher(mqttClient)
|
go outputDispatcher(mqttClient)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user