From f2d1506438eb917dd52b14ce460d5d03390cdefe Mon Sep 17 00:00:00 2001 From: Finn Date: Sun, 20 Oct 2024 21:59:22 -0700 Subject: [PATCH] meshtastic bridge: switch to go impl --- k8s/meshtastic/kustomization.yaml | 6 ++--- ...dge.yaml => matrix-bridge-meshtastic.yaml} | 24 +++++++------------ .../matrix-bridge-meshtastic/config.json | 11 +++++++++ .../matrix-meshtastic-bridge/config.json | 12 ---------- 4 files changed, 23 insertions(+), 30 deletions(-) rename k8s/meshtastic/{matrix-meshtastic-bridge.yaml => matrix-bridge-meshtastic.yaml} (56%) create mode 100644 k8s/meshtastic/matrix-bridge-meshtastic/config.json delete mode 100644 k8s/meshtastic/matrix-meshtastic-bridge/config.json diff --git a/k8s/meshtastic/kustomization.yaml b/k8s/meshtastic/kustomization.yaml index 0b569db..9e2c28a 100644 --- a/k8s/meshtastic/kustomization.yaml +++ b/k8s/meshtastic/kustomization.yaml @@ -3,9 +3,9 @@ kind: Kustomization namespace: meshtastic resources: - namespace.yaml - - matrix-meshtastic-bridge.yaml + - matrix-bridge-meshtastic.yaml - secrets.yaml configMapGenerator: - - name: matrix-meshtastic-bridge + - name: matrix-bridge-meshtastic files: - - matrix-meshtastic-bridge/config.json + - matrix-bridge-meshtastic/config.json diff --git a/k8s/meshtastic/matrix-meshtastic-bridge.yaml b/k8s/meshtastic/matrix-bridge-meshtastic.yaml similarity index 56% rename from k8s/meshtastic/matrix-meshtastic-bridge.yaml rename to k8s/meshtastic/matrix-bridge-meshtastic.yaml index 7aa8d57..ac837ca 100644 --- a/k8s/meshtastic/matrix-meshtastic-bridge.yaml +++ b/k8s/meshtastic/matrix-bridge-meshtastic.yaml @@ -1,35 +1,29 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: matrix-meshtastic-bridge + name: matrix-bridge-meshtastic spec: selector: matchLabels: - app: matrix-meshtastic-bridge - serviceName: matrix-meshtastic-bridge + app: matrix-bridge-meshtastic + serviceName: matrix-bridge-meshtastic replicas: 1 template: metadata: labels: - app: matrix-meshtastic-bridge + app: matrix-bridge-meshtastic spec: - tolerations: - - key: rtlsdr - value: "true" - effect: NoSchedule containers: - - name: matrix-meshtastic-bridge - image: git.janky.solutions/finn/matrix-meshtastic-bridge:sha-4f5b878 + - name: matrix-bridge-meshtastic + image: git.janky.solutions/finn/matrix-bridge-meshtastic:sha-fae2a30 securityContext: privileged: true env: - - name: RUST_LOG - value: debug - - name: CONFIG_PATH + - name: MATRIX_BRIDGE_MESHTASTIC_CONFIG value: /config/config.json envFrom: - secretRef: - name: matrix-meshtastic-bridge + name: matrix-bridge-meshtastic volumeMounts: - name: config mountPath: /config @@ -38,7 +32,7 @@ spec: volumes: - name: config configMap: - name: matrix-meshtastic-bridge + name: matrix-bridge-meshtastic volumeClaimTemplates: - metadata: name: data diff --git a/k8s/meshtastic/matrix-bridge-meshtastic/config.json b/k8s/meshtastic/matrix-bridge-meshtastic/config.json new file mode 100644 index 0000000..b0901bc --- /dev/null +++ b/k8s/meshtastic/matrix-bridge-meshtastic/config.json @@ -0,0 +1,11 @@ +{ + "matrix": { + "user": "@meshtastic-test:janky.bot", + "room": "!VRoqFXTXJCHdTDdilP:janky.solutions", + "state": "/data/matrix.db" + }, + "meshtastic": { + "address": "10.5.0.214" + }, + "db": "/data/bridge.db" +} diff --git a/k8s/meshtastic/matrix-meshtastic-bridge/config.json b/k8s/meshtastic/matrix-meshtastic-bridge/config.json deleted file mode 100644 index 6bcf927..0000000 --- a/k8s/meshtastic/matrix-meshtastic-bridge/config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "matrix": { - "username": "@meshtastic-test:janky.bot", - "room": "!VRoqFXTXJCHdTDdilP:janky.solutions", - "user": "@finn:janky.solutions", - "state": "/data/matrix.db" - }, - "meshtastic": { - "address": "10.5.0.214:80" - }, - "db": "sqlite:///data/bridge.db" -}