Yoink from myoung

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-14 16:38:33 +01:00
parent 676f64c76e
commit c1e00ea45f
5 changed files with 235 additions and 0 deletions

View File

@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
name: ser2net
name: ser2net

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ser2net
resources:
- common.yaml
- ser2net-zigbee.yaml
- ser2net-zwave.yaml

View File

@ -0,0 +1,102 @@
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
value: true
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:
path: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2669726-if00
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: feature.node.kubernetes.io/usb-02_1cf1_0030.present
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

View File

@ -0,0 +1,102 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ser2net-zwave
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
value: true
default:
name: speed
value: 115200n81
connection: &con01
accepter: tcp,3002
connector: serialdev,/dev/zwave,115200N81
options:
kickolduser: true
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: ser2net-zwave
namespace: home-automation
labels:
app.kubernetes.io/name: ser2net-zwave
app.kubernetes.io/instance: rfxcom
annotations:
configmap.reloader.stakater.com/reload: "ser2net-zwave"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: ser2net-zwave
app.kubernetes.io/instance: rfxcom
template:
metadata:
labels:
app.kubernetes.io/name: ser2net-zwave
app.kubernetes.io/instance: rfxcom
annotations:
descheduler.alpha.kubernetes.io/evict: "true"
spec:
containers:
- name: ser2net-zwave
image: jippi/ser2net:latest
resources: {}
securityContext:
allowPrivilegeEscalation: true
privileged: true
ports:
- containerPort: 3002
protocol: TCP
volumeMounts:
- mountPath: /etc/ser2net
name: configmap
- name: usb-zooz
mountPath: /dev/zwave
volumes:
- configMap:
name: ser2net-zwave
name: configmap
- name: usb-zooz
hostPath:
path: /dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_baf11d5406caec11b51361a341be1031-if00-port0
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: feature.node.kubernetes.io/usb-ff_10c4_ea60.present #zooz
operator: Exists
---
kind: Service
apiVersion: v1
metadata:
name: ser2net-zwave
namespace: home-automation
labels:
app.kubernetes.io/name: ser2net-zwave
app.kubernetes.io/instance: rfxcom
spec:
selector:
app.kubernetes.io/name: ser2net-zwave
app.kubernetes.io/instance: rfxcom
ports:
- name: http
protocol: TCP
port: 3002
targetPort: 3002

View File

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ser2net
namespace: argocd
spec:
destination:
namespace: ser2net
server: https://kubernetes.default.svc
project: infra
source:
path: apps-kustomized/ser2net
repoURL: https://git.martyn.berlin/martyn/infra4talos
targetRevision: HEAD
syncPolicy:
automated:
selfHeal: true