From 4aa6015fa4dac3f9fbfef07abf91deaa59ac5d2e Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Mon, 23 Oct 2023 16:25:43 -0400 Subject: [PATCH] seperate deploy --- k8s/apps/frigate/templates/deployment.yaml | 43 +++++++++++++++++----- k8s/apps/frigate/templates/service.yaml | 26 ++++++++++++- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/k8s/apps/frigate/templates/deployment.yaml b/k8s/apps/frigate/templates/deployment.yaml index ceee4ab..8946475 100644 --- a/k8s/apps/frigate/templates/deployment.yaml +++ b/k8s/apps/frigate/templates/deployment.yaml @@ -61,14 +61,14 @@ spec: ports: - containerPort: 5000 name: http - # - containerPort: 8554 - # name: rtsp - # - containerPort: 8555 - # name: webrtc-tcp - # protocol: TCP - # - containerPort: 8555 - # name: webrtc-udp - # protocol: UDP + - 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 @@ -79,6 +79,31 @@ spec: 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: @@ -111,7 +136,7 @@ spec: periodSeconds: 15 ports: - containerPort: 1984 - name: go2rtc + name: http - containerPort: 8554 name: rtsp - containerPort: 8555 diff --git a/k8s/apps/frigate/templates/service.yaml b/k8s/apps/frigate/templates/service.yaml index a709aa7..6a07741 100644 --- a/k8s/apps/frigate/templates/service.yaml +++ b/k8s/apps/frigate/templates/service.yaml @@ -24,7 +24,29 @@ spec: targetPort: 8555 name: webrtc-udp protocol: UDP - - port: 1984 +--- +kind: Service +apiVersion: v1 +metadata: + name: frigate +spec: + selector: + homelab/app: frigate + type: ClusterIP + ports: + - port: 8554 + targetPort: 8554 + name: rtsp + protocol: TCP + - port: 8555 + targetPort: 8555 + name: webrtc-tcp + protocol: TCP + - port: 8555 + targetPort: 8555 + name: webrtc-udp + protocol: UDP + - port: 80 targetPort: 1984 - name: go2rtc + name: http protocol: TCP