homeassistant-charts/templates/deployment.yaml

76 lines
2.1 KiB
YAML

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 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- 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 }}
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 6 }}
{{- end }}