6 Commits
0.0.1 ... 0.0.7

Author SHA1 Message Date
d66483cdf3 minimize debug output
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 10:26:55 +01:00
ecceb5baa3 mqtt cred
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 10:19:58 +01:00
c505c525f8 fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 09:55:54 +01:00
3595bf251d fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 09:53:05 +01:00
1f078aa2a2 fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 09:49:00 +01:00
490bbb2ded fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-12-02 09:46:01 +01:00
6 changed files with 12 additions and 9 deletions

View File

@ -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="matest" PGDATABASE="ma"
export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE
MA_CONF=`cat config-test.json` MA_CONF=`cat config-test.json`

View File

@ -1,6 +1,7 @@
{ {
"mqtt": { "mqtt": {
"broker": "mqtt://emqx01-anonymous-cluster-internal.broker.svc.cluster.local:1883", "broker": "mqtt://emqx01-anonymous-cluster-internal.broker.svc.cluster.local:1883",
"username": "archiver",
"tlsEnable": "false" "tlsEnable": "false"
}, },
"includeTopics": [ "includeTopics": [

View File

@ -23,6 +23,8 @@ spec:
envFrom: envFrom:
- secretRef: - secretRef:
name: ma-db-cred name: ma-db-cred
- secretRef:
name: ma-mqtt-cred
- configMapRef: - configMapRef:
name: ma-conf name: ma-conf

View File

@ -3,21 +3,20 @@
ARG1=$1 ARG1=$1
NAMESPACE=`cat namespace`
IMAGE_NAME=$FORGE_NAME/$CI_REPO IMAGE_NAME=$FORGE_NAME/$CI_REPO
DEPLOYMENT_DIR=$PWD/deployment DEPLOYMENT_DIR=$PWD/deployment
pushd $DEPLOYMENT_DIR > /dev/null pushd $DEPLOYMENT_DIR
./roll-db-credential.sh NAMESPACE=`cat namespace`
kubectl create configmap ma-conf \ kubectl create configmap ma-conf \
--from-literal=MA_CONF="`cat config.json`" \ --from-literal=MA_CONF="`cat config.json`" \
--dry-run=client \ --dry-run=client \
--o yaml \ -o yaml \
--save-config | \ --save-config | \
kubectl apply -f - -n $NAMESPACE kubectl apply -f - -n $NAMESPACE
@ -26,4 +25,4 @@ cat deploy-yml.tmpl | \
kubectl apply -f - -n $NAMESPACE kubectl apply -f - -n $NAMESPACE
popd /dev/null popd

View File

@ -11,6 +11,7 @@ LOGIN=ma
PASSWORD=`openssl rand -base64 24` PASSWORD=`openssl rand -base64 24`
NAMESPACE=`cat namespace` NAMESPACE=`cat namespace`
psql <<EOF psql <<EOF
do do
\$\$ \$\$

View File

@ -29,7 +29,7 @@ func InputArchiver() {
} }
func handleMessage(message database.Message) { func handleMessage(message database.Message) {
log.Printf("Archiving Timestamp: %s, Topic: %s, Payload: %s", message.Time, message.Topic, message.Payload) // log.Printf("Archiving Timestamp: %s, Topic: %s, Payload: %s", message.Time, message.Topic, message.Payload)
dbh.StoreMessage(&message) dbh.StoreMessage(&message)
counter.S("Stored") counter.S("Stored")
} }