Files
homelab/k8s/apps/frigate/templates/deployment.yaml
T
2023-10-23 16:25:43 -04:00

154 lines
4.5 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: "frigate"
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: Recreate
selector:
matchLabels:
homelab/app: frigate
template:
metadata:
labels:
homelab/app: frigate
spec:
volumes:
{{- if .Values.persistence.media_path.enabled }}
- name: media-path
persistentVolumeClaim:
claimName: {{ .Values.persistence.media_path.claimName }}
{{- end }}
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
persistentVolumeClaim:
claimName: {{ .Values.persistence.conf_path.claimName }}
{{- end }}
containers:
- name: frigate
imagePullPolicy: "Always"
securityContext:
privileged: true
image: "{{ .Values.images.frigate.repo }}:{{ .Values.images.frigate.tag | default .Chart.AppVersion }}"
resources:
{{- .Values.resources.frigate.resources | toYaml | nindent 14}}
livenessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
startupProbe:
httpGet:
path: /
port: http
scheme: HTTP
failureThreshold: 60
periodSeconds: 15
ports:
- containerPort: 5000
name: http
- containerPort: 8554
name: rtsp
- containerPort: 8555
name: webrtc-tcp
protocol: TCP
- containerPort: 8555
name: webrtc-udp
protocol: UDP
volumeMounts:
{{- if .Values.persistence.media_path.enabled }}
- name: media-path
mountPath: /media/frigate
{{ end }}
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
mountPath: /config
subPath: frigate
{{ end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: "go2rtc"
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: Recreate
selector:
matchLabels:
homelab/app: go2rtc
template:
metadata:
labels:
homelab/app: go2rtc
spec:
volumes:
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
persistentVolumeClaim:
claimName: {{ .Values.persistence.conf_path.claimName }}
{{- end }}
containers:
- name: go2rtc
imagePullPolicy: "Always"
securityContext:
privileged: true
image: "{{ .Values.images.go2rtc.repo }}:{{ .Values.images.go2rtc.tag | default .Chart.AppVersion }}"
resources:
{{- .Values.resources.go2rtc.resources | toYaml | nindent 14}}
livenessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
startupProbe:
httpGet:
path: /
port: http
scheme: HTTP
failureThreshold: 60
periodSeconds: 15
ports:
- containerPort: 1984
name: http
- containerPort: 8554
name: rtsp
- containerPort: 8555
name: webrtc-tcp
protocol: TCP
- containerPort: 8555
name: webrtc-udp
protocol: UDP
volumeMounts:
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
mountPath: /config
subPath: go2rtc
{{ end }}