75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ .Release.Name }}"
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 2
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
{{ .Release.Name }}/app: z2m
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ .Release.Name }}/app: z2m
|
|
spec:
|
|
affinity:
|
|
{{- .Values.affinity | toYaml | nindent 12}}
|
|
volumes:
|
|
- name: udev
|
|
hostPath:
|
|
path: /run/udev
|
|
- name: zigbee-stick
|
|
hostPath:
|
|
path: "{{ .Values.devicePath }}"
|
|
- name: data-path
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.data_path.claimName }}
|
|
containers:
|
|
- name: main
|
|
imagePullPolicy: "IfNotPresent"
|
|
securityContext:
|
|
privileged: true
|
|
image: "{{ .Values.image }}:{{ .Values.tag | default .Chart.AppVersion }}"
|
|
resources:
|
|
{{- .Values.resources | toYaml | nindent 14}}
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
startupProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 30
|
|
timeoutSeconds: 1
|
|
periodSeconds: 5
|
|
env:
|
|
- name: TZ
|
|
value: "{{ .Values.global.timezone }}"
|
|
- name: "ZIGBEE2MQTT_DATA"
|
|
value: "/data"
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
volumeMounts:
|
|
- name: zigbee-stick
|
|
mountPath: "{{ .Values.devicePath }}"
|
|
- name: data-path
|
|
mountPath: /data
|
|
- name: udev
|
|
mountPath: /run/udev
|
|
|