From 3f8545ae99939295df4cc6dd9a2ca484a8fe7821 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Wed, 15 Nov 2023 12:11:49 -0500 Subject: [PATCH] scrypted --- k8s/apps/frigate/templates/deployment.yaml | 171 --------------------- k8s/apps/frigate/templates/lb.yaml | 18 +++ k8s/apps/frigate/templates/service.yaml | 26 ++++ k8s/apps/frigate/values.yaml | 4 + k8s/argoapps/apps-values/ingresses.yaml | 5 + 5 files changed, 53 insertions(+), 171 deletions(-) delete mode 100644 k8s/apps/frigate/templates/deployment.yaml diff --git a/k8s/apps/frigate/templates/deployment.yaml b/k8s/apps/frigate/templates/deployment.yaml deleted file mode 100644 index a6443c5..0000000 --- a/k8s/apps/frigate/templates/deployment.yaml +++ /dev/null @@ -1,171 +0,0 @@ ---- -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: - {{- if .Values.nodeSelector }} - nodeSelector: - {{- .Values.nodeSelector | toYaml | nindent 8}} - {{- end }} - 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 }} - {{- if .Values.coral.enabled }} - - name: coral-dev - hostPath: - path: {{ .Values.coral.hostPath }} - {{- end }} - - name: dshm - emptyDir: - medium: Memory - containers: - - name: frigate - imagePullPolicy: "Always" - securityContext: - privileged: true - image: "{{ .Values.images.frigate.repo }}:{{ .Values.images.frigate.tag | default .Chart.AppVersion }}" - resources: - {{- .Values.resources.frigate | 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 }} - {{- if .Values.coral.enabled }} - - mountPath: {{ .Values.coral.hostPath }} - name: coral-dev - {{- end }} - - mountPath: /dev/shm - name: dshm ---- -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 | 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/lb.yaml b/k8s/apps/frigate/templates/lb.yaml index 8ddd4c2..45edaf7 100644 --- a/k8s/apps/frigate/templates/lb.yaml +++ b/k8s/apps/frigate/templates/lb.yaml @@ -24,3 +24,21 @@ spec: targetPort: 1984 name: http protocol: TCP +--- +kind: Service +apiVersion: v1 +metadata: + name: scrypted-lb +spec: + selector: + homelab/app: scrypted + type: LoadBalancer + ports: + - port: 554 + targetPort: 554 + name: rtsp-tcp + protocol: TCP + - port: 554 + targetPort: 554 + name: rtsp-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 8fc62f8..876d09e 100644 --- a/k8s/apps/frigate/templates/service.yaml +++ b/k8s/apps/frigate/templates/service.yaml @@ -50,3 +50,29 @@ spec: targetPort: 1984 name: http protocol: TCP +--- +kind: Service +apiVersion: v1 +metadata: + name: scrypted +spec: + selector: + homelab/app: scrypted + type: ClusterIP + ports: + - port: 554 + targetPort: 554 + name: rtsp-tcp + protocol: TCP + - port: 554 + targetPort: 554 + name: rtsp-udp + protocol: UDP + - port: 80 + targetPort: 80 + name: http + protocol: TCP + - port: 443 + targetPort: 443 + name: https + protocol: TCP \ No newline at end of file diff --git a/k8s/apps/frigate/values.yaml b/k8s/apps/frigate/values.yaml index ac11fa2..7300044 100644 --- a/k8s/apps/frigate/values.yaml +++ b/k8s/apps/frigate/values.yaml @@ -7,6 +7,10 @@ images: go2rtc: repo: "alexxit/go2rtc" tag: "latest" + scrypted: + repo: "koush/scrypted" + tag: "latest" + persistence: media_path: diff --git a/k8s/argoapps/apps-values/ingresses.yaml b/k8s/argoapps/apps-values/ingresses.yaml index a1db39e..5aebde3 100644 --- a/k8s/argoapps/apps-values/ingresses.yaml +++ b/k8s/argoapps/apps-values/ingresses.yaml @@ -61,6 +61,11 @@ services: middleware: "apps-ingresses-chain-authentik" group: "Cameras" icon: "https://frigate.home.sosnovsky.ca/assets/favicon-92a9ac8b.ico" + - prefix: "scrypted" + service: "scrypted" + namespace: "apps-frigate" + middleware: "apps-ingresses-chain-authentik" + group: "Cameras" - prefix: "go2rtc" service: "go2rtc" namespace: "apps-frigate"