mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 07:59:02 +00:00
[zigbee2mqtt] update to use common library (#161)
This commit is contained in:
parent
2f9c96082f
commit
eb14f4a479
@ -14,10 +14,11 @@
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
|
@ -1,12 +1,12 @@
|
||||
apiVersion: v2
|
||||
name: zigbee2mqtt
|
||||
type: application
|
||||
appVersion: 1.16.1
|
||||
description: Bridges events and allows you to control your Zigbee devices via MQTT
|
||||
appVersion: 1.15.0
|
||||
version: 2.1.0
|
||||
name: zigbee2mqtt
|
||||
version: 3.0.0
|
||||
keywords:
|
||||
- zigbee
|
||||
- mqtt
|
||||
- home-assistant
|
||||
home: https://www.zigbee2mqtt.io
|
||||
icon: https://www.zigbee2mqtt.io/images/logo.png
|
||||
sources:
|
||||
@ -16,3 +16,7 @@ maintainers:
|
||||
email: helm@movishell.pl
|
||||
- name: masantiago
|
||||
email: miguelangel.santiago@hotmail.com
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: ^1.5.0
|
||||
|
4
charts/zigbee2mqtt/OWNERS
Normal file
4
charts/zigbee2mqtt/OWNERS
Normal file
@ -0,0 +1,4 @@
|
||||
approvers:
|
||||
- billimek
|
||||
reviewers:
|
||||
- billimek
|
@ -1,6 +1,6 @@
|
||||
# zigbee2mqtt: Fully configurable Zigbee to MQTT Gateway
|
||||
# zigbee2mqtt
|
||||
|
||||
This is a helm chart for [zigbee2mqtt](https://www.zigbee2mqtt.io)
|
||||
This is a helm chart for [zigbee2mqtt](https://www.zigbee2mqtt.io).
|
||||
|
||||
## TL;DR;
|
||||
|
||||
@ -17,9 +17,22 @@ To install the chart with the release name `my-release`:
|
||||
helm install --name my-release k8s-at-home/zigbee2mqtt
|
||||
```
|
||||
|
||||
**IMPORTANT NOTE:** a [supported Zigbee sniffer](https://www.zigbee2mqtt.io/getting_started/what_do_i_need.html) must be accessible on the node where this pod runs, in order for this chart to function properly.
|
||||
**IMPORTANT NOTE:** a zigbee controller device must be accessible on the node where this pod runs, in order for this chart to function properly.
|
||||
|
||||
A way to achieve this can be with nodeAffinity rules, for example:
|
||||
First, you will need to mount your zigbee device into the pod, you can do so by adding the following to your values:
|
||||
|
||||
```yaml
|
||||
additionalVolumeMounts:
|
||||
- name: usb
|
||||
mountPath: /path/to/device
|
||||
|
||||
additionalVolumes:
|
||||
- name: usb
|
||||
hostPath:
|
||||
path: /path/to/device
|
||||
```
|
||||
|
||||
Second you will need to set a nodeAffinity rule, for example:
|
||||
|
||||
```yaml
|
||||
affinity:
|
||||
@ -33,9 +46,7 @@ affinity:
|
||||
- zigbee-controller
|
||||
```
|
||||
|
||||
... where a node with an attached zigbee sniffer is labeled with `app: zigbee-controller`
|
||||
|
||||
Because zigbee2mqtt writes to the config file, it is impossible to manage it through this chart. The configuration options will be set as defaults on first run, and then copied to a writeable directory. It can be found in /data/configuration.yaml afterwards.
|
||||
... where a node with an attached zigbee controller USB device is labeled with `app: zigbee-controller`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
@ -47,28 +58,54 @@ helm delete my-release --purge
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Configuration
|
||||
|
||||
Read through the [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/zigbee2mqtt/values.yaml) file. It has several commented out suggested values.
|
||||
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/zigbee2mqtt/values.yaml)
|
||||
file. It has several commented out suggested values.
|
||||
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
helm install --name my-release \
|
||||
--set config.mqtt.server="mqtt://mymqttbroker" \
|
||||
helm install my-release \
|
||||
--set env.TZ="America/New_York" \
|
||||
k8s-at-home/zigbee2mqtt
|
||||
```
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
||||
chart. For example,
|
||||
```console
|
||||
helm install --name my-release -f values.yaml k8s-at-home/zigbee2mqtt
|
||||
helm install my-release k8s-at-home/zigbee2mqtt --values values.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
image:
|
||||
tag: ...
|
||||
```
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
If you get
|
||||
```console
|
||||
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...`
|
||||
```
|
||||
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
|
||||
|
||||
---
|
||||
|
||||
## Upgrading an existing Release to a new major version
|
||||
|
||||
A major chart version change (like 1.0.0 -> 2.0.0) indicates that there is an
|
||||
incompatible breaking change needing manual actions.
|
||||
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
|
||||
|
||||
### Upgrading from 2.x.x to 3.x.x
|
||||
|
||||
**Note:** _It may be wise to back up your existing data incase something unexpected happens_
|
||||
|
||||
As of 3.0.0 this chart was migrated to a centralized [common](https://github.com/k8s-at-home/charts/tree/master/charts/common) library, some values in `values.yaml` have changed.
|
||||
|
||||
Examples:
|
||||
|
||||
* `service.port` has been moved to `service.port.port`.
|
||||
* `persistence.type` has been moved to `controllerType`.
|
||||
|
||||
Refer to the [common](https://github.com/k8s-at-home/charts/tree/master/charts/common) library for more configuration options.
|
||||
|
||||
### Upgrading from 1.x.x to 2.x.x
|
||||
|
||||
|
2
charts/zigbee2mqtt/ci/ct-values.yaml
Normal file
2
charts/zigbee2mqtt/ci/ct-values.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
ingress:
|
||||
enabled: true
|
@ -1,32 +1 @@
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
WARNING: You have disabled persistence. Your pairings and settings will be lost on container restart!
|
||||
{{- else }}
|
||||
Your setting will be applied on first start, and cannot be managed from this chart
|
||||
{{- if not .Values.config.advanced.network_key }}
|
||||
WARNING: You have not set a network key, which makes zigbee2mqtt run with a well-known network key. This is highly insecure.
|
||||
Please read https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.config.frontend .Values.config.experimental }}
|
||||
{{- if and .Values.config.frontend.port .Values.config.experimental.new_api }}
|
||||
Get the Zigbee2MQTT WebUI URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "zigbee2mqtt.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get svc -w {{ include "zigbee2mqtt.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "zigbee2mqtt.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "zigbee2mqtt.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo "Visit http://127.0.0.1:5000 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 5000:80
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "common.notes.defaultNotes" . -}}
|
||||
|
@ -1,63 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.labels" -}}
|
||||
helm.sh/chart: {{ include "zigbee2mqtt.chart" . }}
|
||||
{{ include "zigbee2mqtt.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "zigbee2mqtt.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "zigbee2mqtt.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "zigbee2mqtt.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
31
charts/zigbee2mqtt/templates/common.yaml
Normal file
31
charts/zigbee2mqtt/templates/common.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "common.values.setup" . }}
|
||||
|
||||
{{/* Append the configMap to the additionalVolumes */}}
|
||||
{{- define "zigbee2mqtt.configmap.volume" -}}
|
||||
name: zigbee2mqtt-settings
|
||||
configMap:
|
||||
name: {{ template "common.names.fullname" . }}-settings
|
||||
{{- end -}}
|
||||
|
||||
{{- $volume := include "zigbee2mqtt.configmap.volume" . | fromYaml -}}
|
||||
{{- if $volume -}}
|
||||
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
|
||||
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Append the configMap volume to the additionalVolumeMounts */}}
|
||||
{{- define "zigbee2mqtt.configmap.volumeMount" -}}
|
||||
name: zigbee2mqtt-settings
|
||||
mountPath: /app/configuration.yaml
|
||||
subPath: configuration.yaml
|
||||
{{- end -}}
|
||||
|
||||
{{- $volumeMount := include "zigbee2mqtt.configmap.volumeMount" . | fromYaml -}}
|
||||
{{- if $volumeMount -}}
|
||||
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
|
||||
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "zigbee2mqtt.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}-settings
|
||||
labels:
|
||||
{{ include "zigbee2mqtt.labels" . | indent 4 }}
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
data:
|
||||
configuration.yaml: |
|
||||
{{- with .Values.config }}
|
||||
|
@ -1,37 +0,0 @@
|
||||
{{- if and .Values.config.frontend .Values.config.experimental }}
|
||||
{{- if and .Values.config.frontend.port .Values.config.experimental.new_api }}
|
||||
{{- $fullName := include "zigbee2mqtt.fullname" . -}}
|
||||
{{- $ingressPath := .Values.ingress.path -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{ include "zigbee2mqtt.labels" . | indent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -1,52 +0,0 @@
|
||||
{{- if and .Values.config.frontend .Values.config.experimental }}
|
||||
{{- if and .Values.config.frontend.port .Values.config.experimental.new_api }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "zigbee2mqtt.fullname" . }}
|
||||
labels:
|
||||
{{ include "zigbee2mqtt.labels" . | indent 4 }}
|
||||
{{- if .Values.service.labels }}
|
||||
{{ toYaml .Values.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
|
||||
type: ClusterIP
|
||||
{{- if .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{end}}
|
||||
{{- else if eq .Values.service.type "LoadBalancer" }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
||||
nodePort: {{.Values.service.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
{{- include "zigbee2mqtt.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -1,12 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "zigbee2mqtt.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "zigbee2mqtt.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -1,131 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "zigbee2mqtt.fullname" . }}
|
||||
labels:
|
||||
{{- include "zigbee2mqtt.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "zigbee2mqtt.selectorLabels" . | nindent 6 }}
|
||||
serviceName: {{ include "zigbee2mqtt.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "zigbee2mqtt.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "zigbee2mqtt.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: ZIGBEE2MQTT_DATA
|
||||
value: "/data"
|
||||
- name: TZ
|
||||
value: {{ .Values.timezone }}
|
||||
{{- if .Values.debug }}
|
||||
- name: DEBUG
|
||||
value: {{ .Values.debug }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.extraEnv }}
|
||||
- name: {{ $key | quote }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- range $name, $opts := .Values.extraEnvSecrets }}
|
||||
- name: {{ $name }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $opts.secret }}
|
||||
key: {{ $opts.key }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- range .Values.extraSecretForEnvFrom }}
|
||||
- secretRef:
|
||||
name: {{ . }}
|
||||
{{- end }}
|
||||
{{- if and .Values.config.frontend .Values.config.experimental }}
|
||||
{{- if and .Values.config.frontend.port .Values.config.experimental.new_api }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.config.frontend.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: zigbee2mqtt
|
||||
mountPath: /app/configuration.yaml
|
||||
subPath: configuration.yaml
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: sniffer
|
||||
mountPath: {{ .Values.config.serial.port }}
|
||||
{{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }}{{ end }}
|
||||
volumes:
|
||||
- name: zigbee2mqtt
|
||||
configMap:
|
||||
name: {{ include "zigbee2mqtt.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 }}
|
||||
{{- if .Values.extraVolumes }}{{ toYaml .Values.extraVolumes | trim | nindent 6 }}{{ end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "zigbee2mqtt.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 }}
|
@ -1,16 +1,64 @@
|
||||
# Default values for zigbee2mqtt.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
image:
|
||||
repository: koenkk/zigbee2mqtt
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: 1.16.1
|
||||
|
||||
timezone: "UTC"
|
||||
# Enable zigbee-herdsman debuggin
|
||||
# debug: "zigbee-herdsman*"
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
env: {}
|
||||
# TZ
|
||||
|
||||
service:
|
||||
port:
|
||||
port: 8080
|
||||
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
||||
persistence:
|
||||
data:
|
||||
enabled: false
|
||||
emptyDir: false
|
||||
mountPath: /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
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
# storageClass: "-"
|
||||
# accessMode: ReadWriteOnce
|
||||
# size: 1Gi
|
||||
## Do not delete the pvc upon helm uninstall
|
||||
# skipuninstall: false
|
||||
# existingClaim: ""
|
||||
|
||||
# Path to your zigbee device in the container
|
||||
additionalVolumeMounts:
|
||||
- name: usb
|
||||
mountPath: /dev/ttyACM0
|
||||
|
||||
# Path to your zigbee device on the host
|
||||
additionalVolumes:
|
||||
- name: usb
|
||||
hostPath:
|
||||
path: /dev/ttyACM0
|
||||
|
||||
# affinity:
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: app
|
||||
# operator: In
|
||||
# values:
|
||||
# - zigbee-controller
|
||||
|
||||
# zigbee2mqtt configuration settings
|
||||
# https://www.zigbee2mqtt.io/information/configuration.html
|
||||
config:
|
||||
# These will be applied ONLY on first run
|
||||
# Home Assistant integration (MQTT discovery)
|
||||
@ -24,14 +72,14 @@ config:
|
||||
# MQTT base topic for zigbee2mqtt MQTT messages
|
||||
base_topic: zigbee2mqtt
|
||||
# MQTT server URL
|
||||
server: 'mqtt://localhost'
|
||||
server: "mqtt://localhost"
|
||||
# MQTT server authentication, uncomment if required:
|
||||
# user: my_user
|
||||
# password: my_password
|
||||
|
||||
# Serial settings
|
||||
# USB / Serial settings
|
||||
serial:
|
||||
# Location of CC2531 USB sniffer
|
||||
# Location of your zigbee device
|
||||
port: /dev/ttyACM0
|
||||
|
||||
advanced:
|
||||
@ -44,134 +92,3 @@ config:
|
||||
port: 8080
|
||||
experimental:
|
||||
new_api: true
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
labels: {}
|
||||
## Use loadBalancerIP to request a specific static IP,
|
||||
## otherwise leave blank
|
||||
##
|
||||
loadBalancerIP:
|
||||
# loadBalancerSourceRanges: []
|
||||
## Set the externalTrafficPolicy in the Service to either Cluster or Local
|
||||
# externalTrafficPolicy: Cluster
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
path: /
|
||||
hosts:
|
||||
- chart-example.local
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
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
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
##
|
||||
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||
## the existingClaim variable
|
||||
# existingClaim: zigbee2mqtt-data
|
||||
accessMode: ReadWriteOnce
|
||||
size: 100Mi
|
||||
|
||||
## Additional zigbee2mqtt container environment variable
|
||||
## For instance to add a http_proxy
|
||||
##
|
||||
extraEnv: {}
|
||||
|
||||
## Additional zigbee2mqtt container environment variable from k8s secrets
|
||||
## For instance to add a password
|
||||
extraEnvSecrets:
|
||||
# Example
|
||||
# This will set ${ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD} to the 'password' key from the 'mqtt' secret
|
||||
# ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD:
|
||||
# secret: mqtt
|
||||
# key: password
|
||||
|
||||
## If you'd like to provide your own Kubernetes Secret object instead of passing your values
|
||||
## individually, pass in the name of a created + populated Secret.
|
||||
## All secrets will be mounted as environment variables, with each key/value mapping to a
|
||||
## corresponding environment variable.
|
||||
##
|
||||
extraSecretForEnvFrom: []
|
||||
# - zigbee2mqtt-secrets
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext:
|
||||
privileged: true
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
# Any extra volumes to define for the pod
|
||||
extraVolumes: []
|
||||
# - name: example-name
|
||||
# hostPath:
|
||||
# path: /path/on/host
|
||||
# type: DirectoryOrCreate
|
||||
|
||||
# Any extra volume mounts to define for the containers
|
||||
extraVolumeMounts: []
|
||||
# - name: example-name
|
||||
# mountPath: /path/in/container
|
||||
|
Loading…
Reference in New Issue
Block a user