diff --git a/k8s/apps/frigate/templates/deployment.yaml b/k8s/apps/frigate/templates/deployment.yaml index 8c7ffee..98c7245 100644 --- a/k8s/apps/frigate/templates/deployment.yaml +++ b/k8s/apps/frigate/templates/deployment.yaml @@ -1,7 +1,8 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: - name: "{{ .Release.Name }}" + name: "frigate" spec: replicas: 1 revisionHistoryLimit: 3 @@ -9,11 +10,11 @@ spec: type: RollingUpdate selector: matchLabels: - {{ .Release.Name }}/app: frigate + homelab/app: frigate template: metadata: labels: - {{ .Release.Name }}/app: frigate + homelab/app: frigate spec: volumes: {{- if .Values.persistence.media_path.enabled }} @@ -31,10 +32,9 @@ spec: imagePullPolicy: "IfNotPresent" securityContext: privileged: true - image: "{{ .Values.image }}:{{ .Values.tag | default .Chart.AppVersion }}" + image: "{{ .Values.images.frigate.repo }}:{{ .Values.images.frigate.tag | default .Chart.AppVersion }}" resources: {{- .Values.resources | toYaml | nindent 14}} - livenessProbe: httpGet: path: / @@ -77,4 +77,77 @@ spec: {{- 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: RollingUpdate + 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: main + imagePullPolicy: "IfNotPresent" + securityContext: + privileged: true + image: "{{ .Values.images.go2rtc.repo }}:{{ .Values.images.go2rtc.tag | default .Chart.AppVersion }}" + resources: + {{- .Values.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 }} diff --git a/k8s/apps/frigate/templates/nodeport.yaml b/k8s/apps/frigate/templates/nodeport.yaml index 156c09e..2974c91 100644 --- a/k8s/apps/frigate/templates/nodeport.yaml +++ b/k8s/apps/frigate/templates/nodeport.yaml @@ -2,10 +2,10 @@ kind: Service apiVersion: v1 metadata: - name: {{ .Release.Name }}-nodeport + name: frigate-nodeport spec: selector: - {{ .Release.Name }}/app: frigate + homelab/app: frigate type: NodePort ports: - port: 5000 @@ -27,4 +27,34 @@ spec: nodePort: 30555 targetPort: 8555 name: webrtc-udp - protocol: UDP \ No newline at end of file + protocol: UDP +--- +kind: Service +apiVersion: v1 +metadata: + name: go2rtc-nodeport +spec: + selector: + homelab/app: go2rtc + type: ClusterIP + ports: + - port: 1984 + nodePort: 31000 + targetPort: 1984 + name: http + protocol: TCP + - port: 8554 + nodePort: 31554 + targetPort: 8554 + name: rtsp + protocol: TCP + - port: 8555 + nodePort: 31555 + targetPort: 8555 + name: webrtc-tcp + protocol: TCP + - port: 8555 + nodePort: 31555 + targetPort: 8555 + name: webrtc-udp + protocol: UDP \ No newline at end of file diff --git a/k8s/apps/frigate/templates/service.yaml b/k8s/apps/frigate/templates/service.yaml index 846d3e2..9b17f9d 100644 --- a/k8s/apps/frigate/templates/service.yaml +++ b/k8s/apps/frigate/templates/service.yaml @@ -2,10 +2,10 @@ kind: Service apiVersion: v1 metadata: - name: {{ .Release.Name }} + name: frigate spec: selector: - {{ .Release.Name }}/app: frigate + homelab/app: frigate type: ClusterIP ports: - port: 80 @@ -20,6 +20,32 @@ spec: targetPort: 8555 name: webrtc-tcp protocol: TCP + - port: 8555 + targetPort: 8555 + name: webrtc-udp + protocol: UDP +--- +kind: Service +apiVersion: v1 +metadata: + name: go2rtc +spec: + selector: + homelab/app: go2rtc + type: ClusterIP + ports: + - port: 1984 + targetPort: 1984 + name: http + protocol: TCP + - port: 8554 + targetPort: 8554 + name: rtsp + protocol: TCP + - port: 8555 + targetPort: 8555 + name: webrtc-tcp + protocol: TCP - port: 8555 targetPort: 8555 name: webrtc-udp diff --git a/k8s/apps/frigate/values.yaml b/k8s/apps/frigate/values.yaml index 1eec304..ebd9b32 100644 --- a/k8s/apps/frigate/values.yaml +++ b/k8s/apps/frigate/values.yaml @@ -1,5 +1,12 @@ -image: "ghcr.io/blakeblackshear/frigate" -tag: "0.12.0" + + +images: + frigate: + repo: "ghcr.io/blakeblackshear/frigate" + tag: "latest" + go2rtc: + repo: "alexxit/go2rtc" + tag: "latest" persistence: media_path: