charts/frigate/templates/deployment.yaml

86 lines
2.4 KiB
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "frigate.fullname" . }}
labels:
{{ include "frigate.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "frigate.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "frigate.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
ports:
- name: http
containerPort: 5000
protocol: TCP
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
failureThreshold: 5
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
failureThreshold: 5
timeoutSeconds: 5
env:
{{- if .Values.timezone }}
- name: TZ
value: "{{ .Values.timezone }}"
{{- end }}
- name: RTSP_PASSWORD
value: "{{ .Values.rtspPassword }}"
volumeMounts:
- mountPath: /dev/bus/usb
name: usb
- mountPath: /config
name: config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ template "frigate.fullname" . }}
- name: usb
hostPath:
path: /dev/bus/usb
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}