2022-10-16 10:12:35 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "homeassistant.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "homeassistant.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "homeassistant.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "homeassistant.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
# livenessProbe:
|
|
|
|
# httpGet:
|
|
|
|
# path: /
|
|
|
|
# port: http
|
|
|
|
# scheme: HTTP
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 8123
|
|
|
|
protocol: TCP
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
port: http
|
|
|
|
path: /
|
|
|
|
scheme: HTTP
|
|
|
|
# startupProbe:
|
|
|
|
# httpGet:
|
|
|
|
# port: http
|
|
|
|
# path: /
|
|
|
|
# scheme: HTTP
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
2023-11-09 16:42:34 +00:00
|
|
|
{{- if .Values.persistentStorage.enabled }}
|
|
|
|
volumes:
|
|
|
|
- name: config
|
|
|
|
mountPath: /config
|
2022-10-16 10:12:35 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.podPriorityClassName }}
|
|
|
|
priorityClassName: {{ .Values.podPriorityClassName }}
|
|
|
|
{{- end }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2023-11-09 16:42:34 +00:00
|
|
|
{{- if .Values.persistentStorage.enabled }}
|
2022-10-16 10:12:35 +00:00
|
|
|
volumes:
|
2023-11-09 16:42:34 +00:00
|
|
|
{{- if .Values.persistentStorage.existingClaim }}
|
|
|
|
- name: config
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.persistentStorage.existingClaim }}
|
|
|
|
{{- else }}
|
|
|
|
- name: config
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ include "homeassistant.fullname" . }}
|
|
|
|
{{- end }}
|
2022-10-16 10:12:35 +00:00
|
|
|
{{- end }}
|