Skip to content

Commit

Permalink
build(zigbee2mqtt): 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
JacekZubielik committed Aug 20, 2024
1 parent 6ec2eec commit a8451c8
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 46 deletions.
2 changes: 1 addition & 1 deletion charts/zigbee2mqtt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.39.1
description: Zigbee Bridge via MQTT
name: zigbee2mqtt
version: 0.0.7
version: 0.0.8
type: application
keywords:
- zigbee2mqtt
Expand Down
84 changes: 49 additions & 35 deletions charts/zigbee2mqtt/templates/statefullset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{/* Common labels
- name: TZ
value: {{ .Values.timezone }}
*/}}
- name: ZIGBEE2MQTT_DATA
value: "/data"
{{- if .Values.debug }}
Expand Down Expand Up @@ -104,46 +102,62 @@ spec:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds}}
{{- end }}
volumeMounts:
- name: config-storage
- name: zigbee2mqtt
mountPath: /app/configuration.yaml
subPath: configuration.yaml
- name: data
mountPath: /data
{{- range .Values.hostMounts }}
{{- if .mountPath }}
- mountPath: {{ .mountPath }}
{{- else }}
- mountPath: {{ .hostPath }}
{{- end }}
name: {{ .name }}
{{- end }}
- name: sniffer
mountPath: {{ .Values.config.serial.port }}
volumes:
- name: zigbee2mqtt
configMap:
name: {{ include "app.fullname" . }}
- name: sniffer
hostPath:
path: {{ required "You must specify a path to your zigbee sniffer" .Values.config.serial.port }}
{{- if not .Values.persistence.enabled }}
- name: data
emptyDir: {}
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: config-storage
{{- if .Values.persistence.enabled }}
{{- if .Values.persistence.hostPath }}
hostPath:
path: {{.Values.persistence.hostPath}}
{{- else }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "app.fullname" . }}{{- end }}
{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
{{- range .Values.hostMounts }}
- name: {{ .name }}
hostPath:
path: {{.hostPath}}
{{- if .type }}
type: {{ .type }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
volumeClaimTemplates:
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
- metadata:
name: data
labels:
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
accessModes: [ {{ .Values.persistence.accessMode | quote }} ]
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
{{- end }}
{{- end }}
40 changes: 30 additions & 10 deletions charts/zigbee2mqtt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ fullnameOverride: ""
revisionHistoryLimit: 4
hostNetwork: false

timezone: "CET"

config:
# These will be applied ONLY on first run
# Home Assistant integration (MQTT discovery)
homeassistant: false
# allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://localhost'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of USB sniffer
port: /dev/ttyUSB0
advanced:
network_key: GENERATE
log_output:
- console


replicas: 1
updateStrategy:
type: RollingUpdate
Expand Down Expand Up @@ -149,7 +176,8 @@ tolerations: []

persistence:
enabled: false
## esphome data Persistent Volume Storage Class
annotations: {}
## zigbee2mqtt data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
Expand All @@ -160,14 +188,6 @@ persistence:
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
##
## If you want to use a volume on the host machine instead of a PVC:
# hostPath: /path/to/the/config/folder
# existingClaim: zigbee2mqtt-data
accessMode: ReadWriteOnce
size: 1Gi

# Mount devices or folders from the host machine. Can be used for USB device mounting.
# hostMounts:
# - name: sniffer
# hostPath: /dev/ttyUSB0

0 comments on commit a8451c8

Please sign in to comment.