mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 07:59:02 +00:00
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
apiVersion: apps/v1beta2
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "home-assistant.fullname" . }}
|
|
labels:
|
|
app: {{ template "home-assistant.name" . }}
|
|
chart: {{ template "home-assistant.chart" . }}
|
|
component: "{{ .Release.Name }}-{{ .Values.name }}"
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "home-assistant.name" . }}
|
|
release: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ template "home-assistant.name" . }}
|
|
release: {{ .Release.Name }}
|
|
component: "{{ .Release.Name }}-{{ .Values.name }}"
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
{{- if .Values.mqttService.enabled }}
|
|
- name: mqtt
|
|
containerPort: {{ .Values.mqttService.port }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 15
|
|
env:
|
|
{{- range $key, $value := .Values.extraEnv }}
|
|
- name: {{ $key }}
|
|
value: {{ $value }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: config
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
volumes:
|
|
- name: config
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "home-assistant.fullname" . }}{{- end }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{ end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|