add meshtastic

This commit is contained in:
Finn 2024-10-15 00:07:17 -07:00
parent 1093a91eb3
commit 59f56c64a3
5 changed files with 90 additions and 0 deletions

View file

@ -40,6 +40,14 @@ spec:
usb:
- vendor: "0BDA"
product: "2838"
- --device
- |
name: meshtastic
groups:
- count: 1
usb:
- vendor: "1A86"
product: "55D4"
name: generic-device-plugin
resources:
requests:

View file

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: meshtastic
resources:
- namespace.yaml
- matrix-meshtastic-bridge.yaml
secretGenerator:
- name: matrix-meshtastic-bridge
files:
- matrix-meshtastic-bridge/config.json

View file

@ -0,0 +1,56 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: matrix-meshtastic-bridge
spec:
selector:
matchLabels:
app: matrix-meshtastic-bridge
serviceName: matrix-meshtastic-bridge
replicas: 1
template:
metadata:
labels:
app: matrix-meshtastic-bridge
spec:
tolerations:
- key: rtlsdr
value: "true"
effect: NoSchedule
containers:
- name: matrix-meshtastic-bridge
image: git.janky.solutions/finn/matrix-meshtastic-bridge:sha-008f7cd
securityContext:
privileged: true
env:
- name: RUST_LOG
value: debug
- name: CONFIG_PATH
value: /config/config.json
resources:
limits:
janky.solutions/meshtastic: "1"
volumeMounts:
- name: config
mountPath: /config
- name: ttyacm0
mountPath: /dev/ttyACM0
- name: data
mountPath: /data
volumes:
- name: config
secret:
secretName: matrix-meshtastic-bridge
- name: ttyacm0
hostPath:
type: CharDevice
path: /dev/ttyACM0
volumeClaimTemplates:
- metadata:
name: data
spec:
storageClassName: longhorn
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi

View file

@ -0,0 +1,12 @@
{
"matrix": {
"username": "@meshtastic-test:janky.bot",
"room": "!VRoqFXTXJCHdTDdilP:janky.solutions",
"user": "@finn:janky.solutions",
"state": "/data/matrix.db"
},
"meshtastic": {
"device": "/dev/ttyACM0"
},
"db": "sqlite:///data/bridge.db"
}

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: meshtastic