From fe13e7268a16ee70c921c59884e56b99fd1f979d Mon Sep 17 00:00:00 2001 From: Gorden Mende Date: Thu, 4 Dec 2025 15:33:43 +0000 Subject: [PATCH] added deployment --- deployment.yaml | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ namespace.yaml | 5 +++ service.yaml | 33 ++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 deployment.yaml create mode 100644 namespace.yaml create mode 100644 service.yaml diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..2b8f65d --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,83 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: otbr + namespace: otbr + labels: + app: otbr +spec: + replicas: 1 + selector: + matchLabels: + app: otbr + template: + metadata: + labels: + app: otbr + spec: + hostNetwork: true # Wichtig für direkten Netzwerkzugriff und mDNS + containers: + - name: otbr + image: openthread/border-router:latest # Offizielles Docker-Image + securityContext: + # Benötigt NET_ADMIN, um Netzwerkschnittstellen zu konfigurieren + capabilities: + add: ["NET_ADMIN"] + privileged: true # Privilegierter Modus kann notwendig sein für vollen Gerätezugriff + env: + # Konfigurieren Sie die Umgebungsvariablen entsprechend Ihrem Setup + - name: OT_RCP_DEVICE + # Passen Sie den Pfad zu Ihrem USB-Gerät an + value: "spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200" + - name: OT_INFRA_IF + # Name Ihrer Host-Netzwerkschnittstelle (z.B. eth0 oder wlan0) + value: "eno1" + - name: OT_THREAD_IF + value: "wpan0" # Standardwert + - name: OT_LOG_LEVEL + value: "7" + ports: + # Ports, die der OTBR für Web-GUI (80), mDNS, CoAP benötigt + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 80 + hostPort: 80 + protocol: UDP + # Weitere notwendige Ports für Thread/Matter Kommunikation + - containerPort: 5353 + hostPort: 5353 + protocol: UDP + - containerPort: 49153 + hostPort: 49153 + protocol: UDP + - containerPort: 5180 + hostPort: 5180 + protocol: UDP + - containerPort: 5683 + hostPort: 5683 + protocol: UDP + volumeMounts: + - name: otbr-data + mountPath: /data + - name: device-tun + mountPath: /dev/net/tun + # Zugriff auf das physische USB-Gerät + - name: device-rcp + mountPath: /dev/ttyACM0 # Muss zum OT_RCP_DEVICE passen + resources: + limits: + akri.sh/akri-conbeeii: "1" + requests: + akri.sh/akri-conbeeii: "1" + volumes: + - name: otbr-data + hostPath: + path: /var/lib/otbr # Speicherort auf dem Host für persistente Daten + type: DirectoryOrCreate + - name: device-tun + hostPath: + path: /dev/net/tun + - name: device-rcp + hostPath: + path: /dev/ttyACM0 # Muss zum OT_RCP_DEVICE passen diff --git a/namespace.yaml b/namespace.yaml new file mode 100644 index 0000000..5acd795 --- /dev/null +++ b/namespace.yaml @@ -0,0 +1,5 @@ +# namespace.yaml +kind: Namespace +apiVersion: v1 +metadata: + name: otbr diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..ed8b979 --- /dev/null +++ b/service.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: otbr-lb + namespace: otbr + labels: + appName: otbr +spec: + ports: + - protocol: TCP + port: 80 + targetPort: 80 + name: otbr-web + - protocol: UDP + port: 80 + targetPort: 80 + name: otbr-web-udp + - protocol: UDP + port: 5353 + targetPort: 5353 + - protocol: UDP + port: 49153 + targetPort: 49153 + - protocol: UDP + port: 5180 + targetPort: 5180 + - protocol: UDP + port: 5683 + targetPort: 5683 + selector: + app: deconz + type: LoadBalancer