Skip to content

Commit 381096a

Browse files
Merge pull request #76 from JacekZubielik/zigbee2mqtt
build(zigbee2mqtt): 0.0.8
2 parents 6ec2eec + a8451c8 commit 381096a

3 files changed

Lines changed: 80 additions & 46 deletions

File tree

charts/zigbee2mqtt/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: 1.39.1
33
description: Zigbee Bridge via MQTT
44
name: zigbee2mqtt
5-
version: 0.0.7
5+
version: 0.0.8
66
type: application
77
keywords:
88
- zigbee2mqtt

charts/zigbee2mqtt/templates/statefullset.yaml

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ spec:
4444
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4545
imagePullPolicy: {{ .Values.image.pullPolicy }}
4646
env:
47-
{{/* Common labels
4847
- name: TZ
4948
value: {{ .Values.timezone }}
50-
*/}}
5149
- name: ZIGBEE2MQTT_DATA
5250
value: "/data"
5351
{{- if .Values.debug }}
@@ -104,46 +102,62 @@ spec:
104102
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds}}
105103
{{- end }}
106104
volumeMounts:
107-
- name: config-storage
105+
- name: zigbee2mqtt
106+
mountPath: /app/configuration.yaml
107+
subPath: configuration.yaml
108+
- name: data
108109
mountPath: /data
109-
{{- range .Values.hostMounts }}
110-
{{- if .mountPath }}
111-
- mountPath: {{ .mountPath }}
112-
{{- else }}
113-
- mountPath: {{ .hostPath }}
114-
{{- end }}
115-
name: {{ .name }}
116-
{{- end }}
110+
- name: sniffer
111+
mountPath: {{ .Values.config.serial.port }}
112+
volumes:
113+
- name: zigbee2mqtt
114+
configMap:
115+
name: {{ include "app.fullname" . }}
116+
- name: sniffer
117+
hostPath:
118+
path: {{ required "You must specify a path to your zigbee sniffer" .Values.config.serial.port }}
119+
{{- if not .Values.persistence.enabled }}
120+
- name: data
121+
emptyDir: {}
122+
{{- end }}
123+
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
124+
- name: data
125+
persistentVolumeClaim:
126+
claimName: {{ .Values.persistence.existingClaim }}
127+
{{- end }}
117128
{{- with .Values.nodeSelector }}
118129
nodeSelector:
119-
{{- toYaml . | nindent 8 }}
130+
{{- toYaml . | nindent 8 }}
120131
{{- end }}
121132
{{- with .Values.affinity }}
122133
affinity:
123-
{{- toYaml . | nindent 8 }}
134+
{{- toYaml . | nindent 8 }}
124135
{{- end }}
125136
{{- with .Values.tolerations }}
126137
tolerations:
127-
{{- toYaml . | nindent 8 }}
128-
{{- end }}
129-
volumes:
130-
- name: config-storage
131-
{{- if .Values.persistence.enabled }}
132-
{{- if .Values.persistence.hostPath }}
133-
hostPath:
134-
path: {{.Values.persistence.hostPath}}
135-
{{- else }}
136-
persistentVolumeClaim:
137-
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "app.fullname" . }}{{- end }}
138-
{{- end }}
139-
{{- else }}
140-
emptyDir: {}
141-
{{ end }}
142-
{{- range .Values.hostMounts }}
143-
- name: {{ .name }}
144-
hostPath:
145-
path: {{.hostPath}}
146-
{{- if .type }}
147-
type: {{ .type }}
138+
{{- toYaml . | nindent 8 }}
148139
{{- end }}
149-
{{- end }}
140+
volumeClaimTemplates:
141+
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
142+
- metadata:
143+
name: data
144+
labels:
145+
app.kubernetes.io/name: {{ include "app.name" . }}
146+
app.kubernetes.io/instance: {{ .Release.Name }}
147+
{{- if .Values.persistence.annotations }}
148+
annotations:
149+
{{ toYaml .Values.persistence.annotations | indent 4 }}
150+
{{- end }}
151+
spec:
152+
accessModes: [ {{ .Values.persistence.accessMode | quote }} ]
153+
resources:
154+
requests:
155+
storage: {{ .Values.persistence.size | quote }}
156+
{{- if .Values.persistence.storageClass }}
157+
{{- if (eq "-" .Values.persistence.storageClass) }}
158+
storageClassName: ""
159+
{{- else }}
160+
storageClassName: {{ .Values.persistence.storageClass | quote }}
161+
{{- end }}
162+
{{- end }}
163+
{{- end }}

charts/zigbee2mqtt/values.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,33 @@ fullnameOverride: ""
99
revisionHistoryLimit: 4
1010
hostNetwork: false
1111

12+
timezone: "CET"
13+
14+
config:
15+
# These will be applied ONLY on first run
16+
# Home Assistant integration (MQTT discovery)
17+
homeassistant: false
18+
# allow new devices to join
19+
permit_join: true
20+
# MQTT settings
21+
mqtt:
22+
# MQTT base topic for zigbee2mqtt MQTT messages
23+
base_topic: zigbee2mqtt
24+
# MQTT server URL
25+
server: 'mqtt://localhost'
26+
# MQTT server authentication, uncomment if required:
27+
# user: my_user
28+
# password: my_password
29+
# Serial settings
30+
serial:
31+
# Location of USB sniffer
32+
port: /dev/ttyUSB0
33+
advanced:
34+
network_key: GENERATE
35+
log_output:
36+
- console
37+
38+
1239
replicas: 1
1340
updateStrategy:
1441
type: RollingUpdate
@@ -149,7 +176,8 @@ tolerations: []
149176

150177
persistence:
151178
enabled: false
152-
## esphome data Persistent Volume Storage Class
179+
annotations: {}
180+
## zigbee2mqtt data Persistent Volume Storage Class
153181
## If defined, storageClassName: <storageClass>
154182
## If set to "-", storageClassName: "", which disables dynamic provisioning
155183
## If undefined (the default) or set to null, no storageClassName spec is
@@ -160,14 +188,6 @@ persistence:
160188
##
161189
## If you want to reuse an existing claim, you can pass the name of the PVC using
162190
## the existingClaim variable
163-
# existingClaim: your-claim
164-
##
165-
## If you want to use a volume on the host machine instead of a PVC:
166-
# hostPath: /path/to/the/config/folder
191+
# existingClaim: zigbee2mqtt-data
167192
accessMode: ReadWriteOnce
168193
size: 1Gi
169-
170-
# Mount devices or folders from the host machine. Can be used for USB device mounting.
171-
# hostMounts:
172-
# - name: sniffer
173-
# hostPath: /dev/ttyUSB0

0 commit comments

Comments
 (0)