2023-11-11 08:53:16 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "fhem.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "fhem.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.updateStrategy }}
|
|
|
|
strategy:
|
|
|
|
type: {{- toYaml .Values.updateStrategy | nindent 6 }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "fhem.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "fhem.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
serviceAccountName: {{ include "fhem.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 }}
|
|
|
|
ports:
|
|
|
|
- name: fhemweb
|
|
|
|
containerPort: {{ .Values.containerPorts.fhemweb }}
|
|
|
|
protocol: TCP
|
2024-09-18 19:37:43 +00:00
|
|
|
- name: telnet
|
|
|
|
containerPort: {{ .Values.telnetport }}
|
|
|
|
protocol: TCP
|
2023-11-11 08:53:16 +00:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /fhem
|
|
|
|
port: fhemweb
|
2024-09-18 15:47:30 +00:00
|
|
|
initialDelaySeconds: 60
|
2023-11-11 08:53:16 +00:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /fhem
|
|
|
|
port: fhemweb
|
|
|
|
volumeMounts:
|
2024-10-11 09:51:49 +00:00
|
|
|
{{- if .Values.persistence.enabled }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: fhem-data
|
|
|
|
mountPath: /opt/fhem
|
|
|
|
subPath: fhem/
|
2024-10-11 09:51:49 +00:00
|
|
|
{{- end }}
|
2024-10-11 08:51:32 +00:00
|
|
|
{{- if eq .Values.configtype "configDB" }}
|
2024-10-11 08:04:30 +00:00
|
|
|
- name: configdb-volume
|
|
|
|
mountPath: /opt/fhem/configDB.conf
|
2024-10-11 09:38:52 +00:00
|
|
|
subPath: configDB.conf
|
2024-10-11 08:51:32 +00:00
|
|
|
{{- end }}
|
2023-11-11 08:53:16 +00:00
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
env:
|
|
|
|
- name: LOGFILE
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.logfile | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: TELNETPORT
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.telnetport | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: FHEM_UID
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.fhemUID | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: FHEM_GID
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.fhemGID | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: FHEM_PERM_DIR
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.fhemPermDir | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: FHEM_PERM_FILE
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.fhemPermFile | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: UMASK
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.umask | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: BLUETOOTH_GID
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.bluetoothGID | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: GPIO_GID
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.gpioGID | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: I2C_GID
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.i2cGID | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: TIMEOUT
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.timeout | quote }}
|
2024-09-18 15:04:02 +00:00
|
|
|
- name: TIMEOUT_STARTING
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.timeoutstarting | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LANG
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lang | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LANGUAGE
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.language | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_ADDRESS
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcAddress | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_MEASUREMENT
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.measurement | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_MESSAGES
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcMessages | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_MONETARY
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcMonetary | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_NAME
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcName | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_NUMERIC
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcNumeric | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_PAPER
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcPaper | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_TELEPHONE
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcTelephone | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: LC_TIME
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.lcTime | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: TZ
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.timezone | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
- name: CONFIGTYPE
|
2024-09-18 19:23:50 +00:00
|
|
|
value: {{ .Values.configtype | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
volumes:
|
|
|
|
{{- if .Values.persistence.enabled }}
|
2024-10-11 08:04:30 +00:00
|
|
|
- name: fhem-data
|
2023-11-11 08:53:16 +00:00
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ include "fhem.fullname" . }}
|
|
|
|
{{- end }}
|
2024-10-11 08:04:30 +00:00
|
|
|
{{- if eq .Values.configtype "configDB" }}
|
|
|
|
- name: configdb-volume
|
|
|
|
secret:
|
|
|
|
secretName: {{ .Release.Name }}-db-config-secret
|
|
|
|
{{- end }}
|
2024-09-18 19:23:50 +00:00
|
|
|
restartPolicy: {{ .Values.restartPolicy }}
|