2023-11-14 15:38:33 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: ser2net
|
|
|
|
data:
|
|
|
|
ser2net.yaml: |
|
|
|
|
%YAML 1.1
|
|
|
|
---
|
|
|
|
define: &confver 1.0
|
|
|
|
define: &banner Connected to port \N(\d)\r\n
|
|
|
|
default:
|
|
|
|
name: local
|
|
|
|
value: true
|
|
|
|
class: serialdev
|
|
|
|
default:
|
|
|
|
name: mdns
|
|
|
|
value: false
|
|
|
|
default:
|
|
|
|
name: mdns-sysattrs
|
2023-11-14 16:10:44 +00:00
|
|
|
value: false
|
2023-11-14 15:38:33 +00:00
|
|
|
default:
|
|
|
|
name: speed
|
|
|
|
value: 115200n81
|
|
|
|
connection: &con01
|
|
|
|
accepter: tcp,3001
|
|
|
|
connector: serialdev,/dev/zig,115200n81,nobreak,local
|
|
|
|
options:
|
|
|
|
kickolduser: true
|
|
|
|
---
|
|
|
|
kind: Deployment
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: ser2net
|
|
|
|
namespace: home-automation
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: ser2net
|
|
|
|
app.kubernetes.io/instance: rfxcom
|
|
|
|
annotations:
|
|
|
|
configmap.reloader.stakater.com/reload: "ser2net"
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: ser2net
|
|
|
|
app.kubernetes.io/instance: rfxcom
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: ser2net
|
|
|
|
app.kubernetes.io/instance: rfxcom
|
|
|
|
annotations:
|
|
|
|
descheduler.alpha.kubernetes.io/evict: "true"
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: ser2net
|
|
|
|
image: jippi/ser2net:latest
|
|
|
|
resources: {}
|
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: true
|
|
|
|
privileged: true
|
|
|
|
ports:
|
|
|
|
- containerPort: 3001
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/ser2net
|
|
|
|
name: configmap
|
|
|
|
- name: usb-conbee
|
|
|
|
mountPath: /dev/zig
|
|
|
|
volumes:
|
|
|
|
- configMap:
|
|
|
|
name: ser2net
|
|
|
|
name: configmap
|
|
|
|
- name: usb-conbee
|
|
|
|
hostPath:
|
2023-11-14 15:47:09 +00:00
|
|
|
path: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_1a3ee6f57a12ec11823821c7bd930c07-if00-port0
|
2023-11-14 15:38:33 +00:00
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
nodeSelectorTerms:
|
|
|
|
- matchExpressions:
|
2023-11-14 15:47:09 +00:00
|
|
|
- key: feature.node.kubernetes.io/usb-ff_10c4_ea60.present
|
2023-11-14 15:38:33 +00:00
|
|
|
operator: Exists
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: ser2net
|
|
|
|
namespace: home-automation
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: ser2net
|
|
|
|
app.kubernetes.io/instance: rfxcom
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: ser2net
|
|
|
|
app.kubernetes.io/instance: rfxcom
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
protocol: TCP
|
|
|
|
port: 3001
|
|
|
|
targetPort: 3001
|