2021-10-13 20:46:42 +00:00
|
|
|
image:
|
2021-12-03 12:02:44 +00:00
|
|
|
repository: tccr.io/truecharts/zigbee2mqtt
|
2023-01-19 18:19:24 +00:00
|
|
|
tag: 1.29.2@sha256:261040b53abd295a16d997819461f2f47c08b8c202f5137f22a85f9e42606e4c
|
2021-10-13 20:46:42 +00:00
|
|
|
pullPolicy: IfNotPresent
|
|
|
|
|
2022-06-07 17:41:19 +00:00
|
|
|
secretEnv:
|
2022-03-20 12:02:58 +00:00
|
|
|
ZIGBEE2MQTT_CONFIG_MQTT_USER: ""
|
|
|
|
ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD: ""
|
2022-03-19 10:09:16 +00:00
|
|
|
|
2021-10-13 20:46:42 +00:00
|
|
|
env:
|
2022-03-18 21:27:58 +00:00
|
|
|
ZIGBEE2MQTT_DATA: "/data"
|
2022-03-20 12:02:58 +00:00
|
|
|
ZIGBEE2MQTT_CONFIG_FRONTEND_PORT: "{{ .Values.service.main.ports.main.port }}"
|
|
|
|
# User defined
|
2022-04-03 15:20:30 +00:00
|
|
|
USE_CUSTOM_CONFIG_FILE: false
|
|
|
|
# This values are required for the autogenerated file to work.
|
|
|
|
# ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API: true
|
|
|
|
# ZIGBEE2MQTT_CONFIG_PERMIT_JOIN: true
|
|
|
|
# ZIGBEE2MQTT_CONFIG_MQTT_SERVER: "mqtt://localhost"
|
|
|
|
# ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC: "zigbee2mqtt"
|
|
|
|
# ZIGBEE2MQTT_CONFIG_SERIAL_PORT: "/dev/ttyUSB0"
|
|
|
|
# ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER: "auto"
|
2022-03-18 21:27:58 +00:00
|
|
|
|
|
|
|
securityContext:
|
|
|
|
runAsNonRoot: false
|
2022-03-20 21:45:27 +00:00
|
|
|
readOnlyRootFilesystem: false
|
2022-03-18 21:27:58 +00:00
|
|
|
|
|
|
|
podSecurityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
runAsGroup: 0
|
2021-10-13 20:46:42 +00:00
|
|
|
|
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
2021-11-28 09:26:31 +00:00
|
|
|
port: 10103
|
2021-10-13 20:46:42 +00:00
|
|
|
|
|
|
|
persistence:
|
|
|
|
data:
|
|
|
|
enabled: true
|
2021-11-14 19:19:16 +00:00
|
|
|
mountPath: "/data"
|
2022-03-20 21:45:27 +00:00
|
|
|
|
|
|
|
initContainers:
|
|
|
|
init-config:
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: "/data"
|
|
|
|
env:
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_FRONTEND_PORT
|
|
|
|
value: "{{ .Values.service.main.ports.main.port }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_PERMIT_JOIN
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_PERMIT_JOIN }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_MQTT_SERVER
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_MQTT_SERVER }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_MQTT_USER
|
|
|
|
value: "{{ .Values.secret.ZIGBEE2MQTT_CONFIG_MQTT_USER }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD
|
|
|
|
value: "{{ .Values.secret.ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_SERIAL_PORT
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_SERIAL_PORT }}"
|
|
|
|
- name: ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER
|
|
|
|
value: "{{ .Values.env.ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER }}"
|
2022-04-03 15:20:30 +00:00
|
|
|
- name: USE_CUSTOM_CONFIG_FILE
|
|
|
|
value: "{{ .Values.env.USE_CUSTOM_CONFIG_FILE }}"
|
2022-03-20 21:45:27 +00:00
|
|
|
command: ["/bin/sh", "-c"]
|
|
|
|
args:
|
|
|
|
- >
|
2022-04-03 15:20:30 +00:00
|
|
|
if [ -f /data/configuration.yaml ] || [ ${USE_CUSTOM_CONFIG_FILE} == true ];
|
2022-03-20 21:45:27 +00:00
|
|
|
then
|
2022-04-03 15:20:30 +00:00
|
|
|
echo "Initial configuration exists or User selected to use custom configuration file. Skipping...";
|
2022-03-20 21:45:27 +00:00
|
|
|
else
|
|
|
|
echo "Creating initial configuration";
|
|
|
|
touch /data/configuration.yaml;
|
|
|
|
echo "# Configuration bellow will be always be overridden" >> /data/configuration.yaml;
|
|
|
|
echo "# from environment settings on the Scale Apps UI." >> /data/configuration.yaml;
|
|
|
|
echo "# You however will not see this values change in the file." >> /data/configuration.yaml;
|
2022-04-03 15:20:30 +00:00
|
|
|
echo "# It's a generated file based on the values provided on initial install." >> /data/configuration.yaml;
|
2022-03-20 21:45:27 +00:00
|
|
|
echo "##########################################################" >> /data/configuration.yaml;
|
|
|
|
echo "experimental:" >> /data/configuration.yaml;
|
|
|
|
echo " new_api: $ZIGBEE2MQTT_CONFIG_EXPIRIMENTAL_NEW_API" >> /data/configuration.yaml;
|
|
|
|
echo "frontend:" >> /data/configuration.yaml;
|
|
|
|
echo " port: $ZIGBEE2MQTT_CONFIG_FRONTEND_PORT" >> /data/configuration.yaml;
|
|
|
|
echo "permit_join: $ZIGBEE2MQTT_CONFIG_PERMIT_JOIN" >> /data/configuration.yaml;
|
|
|
|
echo "mqtt:" >> /data/configuration.yaml;
|
|
|
|
echo " server: $ZIGBEE2MQTT_CONFIG_MQTT_SERVER" >> /data/configuration.yaml;
|
|
|
|
echo " base_topic: $ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC" >> /data/configuration.yaml;
|
|
|
|
if [ ! -z "$ZIGBEE2MQTT_CONFIG_MQTT_USER" ];
|
|
|
|
then
|
|
|
|
echo " user: $ZIGBEE2MQTT_CONFIG_MQTT_USER" >> /data/configuration.yaml;
|
|
|
|
fi;
|
|
|
|
if [ ! -z "$ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD" ];
|
|
|
|
then
|
|
|
|
echo " password: $ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD" >> /data/configuration.yaml;
|
|
|
|
fi;
|
|
|
|
echo "serial:" >> /data/configuration.yaml;
|
|
|
|
echo " port: $ZIGBEE2MQTT_CONFIG_SERIAL_PORT" >> /data/configuration.yaml;
|
|
|
|
echo " adapter: $ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER" >> /data/configuration.yaml;
|
|
|
|
echo "##########################################################" >> /data/configuration.yaml;
|
|
|
|
echo 'Initial configuration file created at "/data/configuration.yaml"';
|
|
|
|
fi;
|
2022-08-08 21:25:02 +00:00
|
|
|
|
|
|
|
portal:
|
|
|
|
enabled: true
|