Skip to content

Commit

Permalink
feat(zigbee2mqtt): add secondary instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Diaoul committed Jan 18, 2025
1 parent 2e90d98 commit eeb4272
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 27 deletions.
2 changes: 1 addition & 1 deletion kubernetes/apps/home-automation/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ resources:
- ./go2rtc/ks.yaml
- ./home-assistant/ks.yaml
- ./zigbee2mqtt/ks.yaml
- ./zigbee2mqtt-old/ks.yaml
- ./zigbee2mqtt-secondary/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: zigbee2mqtt-old
name: zigbee2mqtt-secondary
spec:
interval: 30m
chart:
Expand All @@ -29,7 +29,7 @@ spec:
namespace: volsync-system
values:
controllers:
zigbee2mqtt-old:
zigbee2mqtt:
annotations:
reloader.stakater.com/auto: "true"
pod:
Expand All @@ -44,30 +44,42 @@ spec:
app:
image:
repository: ghcr.io/koenkk/zigbee2mqtt
tag: 1.42.0@sha256:732ae43d714610040bd049487b60af3b2dbcfdefb5f169897455b60d715e2131
tag: 2.0.0@sha256:6105a3a01a66bbfb98909a7c309d0707ec7b41728ac15d399747077225231545
env:
ZIGBEE2MQTT_DATA: /data
ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC: zigbee2mqtt-old
# adapter
ZIGBEE2MQTT_CONFIG_SERIAL_PORT: tcp://tubeszb-cc2652.milkyway:6638
ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER: zstack
# mqtt
ZIGBEE2MQTT_CONFIG_MQTT_SERVER: mqtt://emqx-listeners.database.svc.cluster.local:1883
ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC: zigbee2mqtt-secondary
ZIGBEE2MQTT_CONFIG_MQTT_USER: ${EMQX_USER_USERNAME}
ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD: ${EMQX_USER_PASSWORD}
ZIGBEE2MQTT_CONFIG_MQTT_VERSION: 5
ZIGBEE2MQTT_CONFIG_SERIAL_PORT: tcp://zigbee.milkyway:6638
ZIGBEE2MQTT_CONFIG_FRONTEND_URL: https://zigbee2mqtt-old.${DOMAIN}
ZIGBEE2MQTT_CONFIG_ADVANCED_LEGACY_API: "false"
ZIGBEE2MQTT_CONFIG_ADVANCED_LEGACY_AVAILABILITY_PAYLOAD: "false"
ZIGBEE2MQTT_CONFIG_ADVANCED_LAST_SEEN: ISO_8601
# zigbee network
ZIGBEE2MQTT_CONFIG_ADVANCED_CHANNEL: 20
# frontend
ZIGBEE2MQTT_CONFIG_FRONTEND_ENABLED: true
ZIGBEE2MQTT_CONFIG_FRONTEND_URL: https://zigbee2mqtt-secondary.${DOMAIN}
# devices and groups
ZIGBEE2MQTT_CONFIG_DEVICES: devices.yaml
ZIGBEE2MQTT_CONFIG_GROUPS: groups.yaml
# logging
ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_LEVEL: info
ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_OUTPUT: '["console"]'
ZIGBEE2MQTT_CONFIG_ADVANCED_HOMEASSISTANT_LEGACY_ENTITY_ATTRIBUTES: "false"
ZIGBEE2MQTT_CONFIG_ADVANCED_HOMEASSISTANT_LEGACY_TRIGGERS: "false"
ZIGBEE2MQTT_CONFIG_ADVANCED_HOMEASSISTANT_STATUS_TOPIC: homeassistant/status
# device-availability
ZIGBEE2MQTT_CONFIG_AVAILABILITY_ENABLED: true
ZIGBEE2MQTT_CONFIG_AVAILABILITY_ACTIVE_TIMEOUT: 60
ZIGBEE2MQTT_CONFIG_AVAILABILITY_PASSIVE_TIMEOUT: 2000
ZIGBEE2MQTT_CONFIG_DEVICE_OPTIONS_RETAIN: "true"
ZIGBEE2MQTT_CONFIG_HOMEASSISTANT: "true"
ZIGBEE2MQTT_CONFIG_DEVICE_OPTIONS_RETAIN: true
# home-assistant
ZIGBEE2MQTT_CONFIG_HOMEASSISTANT_ENABLED: true
# security
ZIGBEE2MQTT_CONFIG_PERMIT_JOIN: false
envFrom:
- secretRef:
name: zigbee2mqtt-old
name: zigbee2mqtt-secondary
probes:
liveness:
enabled: true
Expand All @@ -81,7 +93,9 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
capabilities:
drop: ["ALL"]
add: ["NET_BIND_SERVICE"]
resources:
requests:
cpu: 20m
Expand All @@ -90,20 +104,20 @@ spec:
memory: 500Mi
service:
app:
controller: zigbee2mqtt-old
controller: zigbee2mqtt
ports:
http:
port: 8080
ingress:
app:
className: internal
hosts:
- host: zigbee2mqtt-old.${DOMAIN}
- host: zigbee2mqtt-secondary.${DOMAIN}
paths:
- path: /
service:
identifier: app
port: http
persistence:
data:
existingClaim: zigbee2mqtt-old
existingClaim: zigbee2mqtt-secondary
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
apiVersion: v1
kind: Secret
metadata:
name: zigbee2mqtt-old
name: zigbee2mqtt-secondary
stringData:
ZIGBEE2MQTT_CONFIG_ADVANCED_PAN_ID: ENC[AES256_GCM,data:qy3wLrA=,iv:QVZQR88HFKMZP3hLVNpcleLLDj0da41HRumUkq7ZcPA=,tag:P4LbNgc+2HDZ4JS+jcEejA==,type:str]
ZIGBEE2MQTT_CONFIG_ADVANCED_EXT_PAN_ID: ENC[AES256_GCM,data:XT0GGug4RXMNjSeNzwCRtwSoNRMI4fB6yQNyP96Y2sk=,iv:4JRTHLzI1aXygBMmQ8UdoJgV3cUj5rxd0/8XWKo5niU=,tag:B81despZn8ohWAN1pYUXRg==,type:str]
ZIGBEE2MQTT_CONFIG_ADVANCED_NETWORK_KEY: ENC[AES256_GCM,data:jV4RByLwjAkZYwWbeZSzXnbsaXYmG0hC3HY6lXsVdHp3fW6dtpa6Cxo5CCsTxRMtXXPW2w5EomMdOyt5ag2I6LSmW6hgceRNGE8=,iv:jh3zEB2eGLBYkYQeAnn7vP72liFmN6S+GLzrhZ8l9sg=,tag:2eXnfCwZSx6CBFifLhp/Ew==,type:str]
ZIGBEE2MQTT_CONFIG_ADVANCED_PAN_ID: ENC[AES256_GCM,data:6z0skl8=,iv:zPsTN7HcfB1YZ2F/xT/QA3LyVb+jqr/uBJIghe2++k4=,tag:ngIlemCL3ctkhkgL46R4nw==,type:str]
ZIGBEE2MQTT_CONFIG_ADVANCED_EXT_PAN_ID: ENC[AES256_GCM,data:yHUve+5Qa9OLeHJO2VQMSOUIzuYNu6xU3HIbyL3n+CrRCfj8XXWr,iv:J5A1WCbgWMpHNHzNR75DXk10eHkdQ/D3+k1SqqLa1R4=,tag:M9nj+T+/43gsoXzGbcVg4A==,type:str]
ZIGBEE2MQTT_CONFIG_ADVANCED_NETWORK_KEY: ENC[AES256_GCM,data:EZjs3BU5tpFZHAjXOqtLqUoF9wvUoxeFHJliddCcC0iQ4f8aUN6cR+Ir3UqrUWhYhPX0P1keJqf4SIyKcxrsUYzgIAeAvyk=,iv:5k+e+weaH5V4m1uwwox/dx3N8WgpRd/poZuJn/zztJk=,tag:8EKFgg5kgdN4B6sko/YJVA==,type:str]
sops:
kms: []
gcp_kms: []
Expand All @@ -22,8 +22,8 @@ sops:
Um4xWW1NbzVtWWZwa0J5TVg2bjljRTgKuOYdmIdwA0NM4ZPZKtctRdV+Fuhh2VYu
01QWsAIomzh5fPc0+nbPvdNDwhGRVPuMEgKdPTA6FuVYqWIIXoM6vg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-01-11T09:09:34Z"
mac: ENC[AES256_GCM,data:9HCuhS2Q/z6fuMKMEd/bBTxxFypgd+EgXrrF9N1WaoD3zJSTzJwOfR/std/V5l1uIGf/2Lqc/f+1SoCVgE6MFz4na+ywKboVJVY99D3GI7qIJrhxV2Q4ZqXthFjvtBS5RQYqtp6XOLzgo3HQpb/w9rK0TtfqHNY8HsrcKUwHgNo=,iv:zwregG/VXbjgOxq25CwH0E02jzBKPQca3QJ0lYIamlA=,tag:Ht03zDhjzpaLoU6IRRTaug==,type:str]
lastmodified: "2025-01-18T17:36:23Z"
mac: ENC[AES256_GCM,data:qzARozRnW7pXwrw80ESaNYjlepzQctC1deDuuCke3TIAfok33hxKCz8yo5/Ogt5uzB/I342jGpESuBWLqiy4fj2/JpLWrPzeuu9lvpRRGFuku+s9mwKikGffdKqo9EBpj9oiFYXQ3mYidnbwSgSFDsLAvNJq40GdcOHtzZpprE0=,iv:ainjXnlcv3f7JK4eT5IEFKoxV4SmMG/Ktro6KgRmoQE=,tag:PcIyjnvjvPu9SL3Xs0nipg==,type:str]
pgp:
- created_at: "2024-06-22T15:24:38Z"
enc: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app zigbee2mqtt-old
name: &app zigbee2mqtt-secondary
namespace: flux-system
spec:
targetNamespace: home-automation
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/home-automation/zigbee2mqtt-old/app
path: ./kubernetes/apps/home-automation/zigbee2mqtt-secondary/app
sourceRef:
kind: GitRepository
name: home-kubernetes
Expand Down

0 comments on commit eeb4272

Please sign in to comment.