Mangle to taste

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-14 16:56:11 +01:00
parent f5ac22c46f
commit 6c9a5b1e3e
6 changed files with 2 additions and 244 deletions

View File

@ -32,143 +32,7 @@ data:
mqtt: mqtt:
base_topic: zigbee2mqtt base_topic: zigbee2mqtt
include_device_information: true include_device_information: true
server: 'mqtt://mosquitto.service.kube' server: 'mqtt://mosquitto.martyn.berlin'
permit_join: false permit_join: false
devices: devices:
'0x001788010694ee2d':
friendly_name: pantry
'0xb0ce1814032e8038':
friendly_name: kitchen_1
'0xb0ce1814032d2128':
friendly_name: kitchen_2
'0xb0ce1814032ea0c1':
friendly_name: kitchen_3
'0xb0ce1814032df653':
friendly_name: kitchen_5
'0xb0ce1814032f02e8':
friendly_name: kitchen_4
'0xb0ce1814032d77bd':
friendly_name: kitchen_sink
'0x001788010694ea33':
friendly_name: dining_5
'0x00178801042b6376':
friendly_name: dining_1
'0x0017880104889944':
friendly_name: dining_2
'0x00178801065ce007':
friendly_name: dining_3
'0x00178801065d8925':
friendly_name: dining_4
'0x00178801031a913d':
friendly_name: laundry_1
'0x00178801031f5205':
friendly_name: laundry_2
'0x0017880106da874e':
friendly_name: living_room_2
'0x00178801063b3145':
friendly_name: living_room_1
'0x00178801087745db':
friendly_name: downstairs_hall_1
'0x001788010877486e':
friendly_name: front_door_1
'0x0017880106c41569':
friendly_name: front_door_2
'0x00178801065f8c7c':
friendly_name: library_1
'0x00178801065d6823':
friendly_name: half_bath_2
'0x0017880106a97503':
friendly_name: half_bath_1
'0xb0ce1814032e09c8':
friendly_name: downstairs_hall_2
groups: groups:
'1':
friendly_name: kitchen
devices:
- 0xb0ce1814032e8038/1
- 0xb0ce1814032d2128/1
- 0xb0ce1814032ea0c1/1
- 0xb0ce1814032df653/1
- 0xb0ce1814032f02e8/1
'2':
friendly_name: downstairs
devices:
- 0xb0ce1814032e8038/1
- 0x001788010694ee2d/11
- 0xb0ce1814032d2128/1
- 0xb0ce1814032ea0c1/1
- 0xb0ce1814032d77bd/1
- 0xb0ce1814032df653/1
- 0xb0ce1814032f02e8/1
- 0x001788010694ea33/11
- 0x00178801042b6376/11
- 0x0017880104889944/11
- 0x00178801065ce007/11
- 0x00178801065d8925/11
- 0x0017880106da874e/11
- 0x00178801063b3145/11
- 0x00178801087745db/11
- 0x001788010877486e/11
- 0x0017880106c41569/11
- 0x00178801065f8c7c/11
- 0x00178801065d6823/11
- 0x0017880106a97503/11
- 0x00178801031a913d/11
- 0x00178801031f5205/11
- 0xb0ce1814032e09c8/1
'3':
friendly_name: dining_room
devices:
- 0x001788010694ea33/11
- 0x00178801042b6376/11
- 0x0017880104889944/11
- 0x00178801065ce007/11
- 0x00178801065d8925/11
'4':
friendly_name: living_room
devices:
- 0x0017880106da874e/11
- 0x00178801063b3145/11
'5':
friendly_name: laundry_room
devices:
- 0x00178801031a913d/11
- 0x00178801031f5205/11
'6':
friendly_name: library
devices:
- 0x001788010877486e/11
- 0x0017880106c41569/11
- 0x00178801065f8c7c/11
- 0x00178801087745db/11
'7':
friendly_name: half_bath
devices:
- 0x00178801065d6823/11
- 0x0017880106a97503/11
'8':
friendly_name: all
devices:
- 0xb0ce1814032e8038/1
- 0x001788010694ee2d/11
- 0xb0ce1814032d2128/1
- 0xb0ce1814032ea0c1/1
- 0xb0ce1814032d77bd/1
- 0xb0ce1814032df653/1
- 0xb0ce1814032f02e8/1
- 0x001788010694ea33/11
- 0x00178801042b6376/11
- 0x0017880104889944/11
- 0x00178801065ce007/11
- 0x00178801065d8925/11
- 0x0017880106da874e/11
- 0x00178801063b3145/11
- 0x00178801087745db/11
- 0x001788010877486e/11
- 0x0017880106c41569/11
- 0x00178801065f8c7c/11
- 0x00178801065d6823/11
- 0x0017880106a97503/11
- 0x00178801031a913d/11
- 0x00178801031f5205/11
- 0xb0ce1814032e09c8/1

View File

@ -5,8 +5,5 @@ namespace: zigbee2mqtt
resources: resources:
- namespace.yaml - namespace.yaml
- configmap.yaml - configmap.yaml
- vault.yaml
- zigbee2mqtt.yaml - zigbee2mqtt.yaml
- pv.yaml
- pvc.yaml - pvc.yaml
- traefik.yaml

View File

@ -1,21 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: zigbee2mqtt
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 128Mi
hostPath:
path: /var/mnt/storage/zigbee2mqtt
type: DirectoryOrCreate
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: feature.node.kubernetes.io/usb-08_0781_5597.present
operator: Exists
persistentVolumeReclaimPolicy: Retain
storageClassName: local-path
volumeMode: Filesystem

View File

@ -1,36 +0,0 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: zigbee2mqtt-redirect
annotations:
kubernetes.io/ingress.class: traefik
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`zig.service.kube`)
priority: 10
middlewares:
- name: httpredirectscheme
namespace: traefik
services:
- name: zigbee2mqtt
port: 8080
---
# Source: zigbee2mqtt/templates/ingress.yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: zigbee2mqtt
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`zig.service.kube`)
services:
- name: zigbee2mqtt
port: 8080
tls: {}

View File

@ -1,33 +0,0 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultConnection
metadata:
name: default
spec:
address: http://192.168.3.2:8200
skipTLSVerify: true
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: zigbee2mqtt
spec:
vaultAuthRef: zigbee2mqtt
mount: secret/
type: kv-v2
path: zigbee2mqtt
refreshAfter: 60s
destination:
create: true
name: zigbee2mqtt
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: zigbee2mqtt
spec:
method: kubernetes
mount: kubernetes
kubernetes:
role: zigbee2mqtt
serviceAccount: default

View File

@ -54,15 +54,9 @@ spec:
- command: - command:
- /bin/sh - /bin/sh
- -c - -c
- cp /configs/configuration.yaml /data/;echo $SECRETS_YAML | base64 -d >/data/secrets.yaml; - cp /configs/configuration.yaml /data/;
image: alpine:latest image: alpine:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env:
- name: SECRETS_YAML
valueFrom:
secretKeyRef:
key: secrets
name: zigbee2mqtt
name: copy name: copy
volumeMounts: volumeMounts:
- mountPath: /data - mountPath: /data
@ -114,13 +108,6 @@ spec:
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: ClusterFirstWithHostNet
enableServiceLinks: true enableServiceLinks: true
hostNetwork: true hostNetwork: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: feature.node.kubernetes.io/usb-08_0781_5597.present
operator: Exists
serviceAccountName: default serviceAccountName: default
volumes: volumes:
- configMap: - configMap: