Skip to content

Commit

Permalink
update frigate
Browse files Browse the repository at this point in the history
  • Loading branch information
carpenike committed Dec 6, 2024
1 parent 4f7e932 commit 393bb34
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ logger:
# frigate.record: debug

mqtt:
host: mosquitto
host: emqx.db.svc.cluster.local
topic_prefix: frigate
user: "{FRIGATE_MQTT_USERNAME}"
password: "{FRIGATE_MQTT_PASSWORD}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: frigate
namespace: home
spec:
secretStoreRef:
kind: ClusterSecretStore
Expand All @@ -17,8 +16,8 @@ spec:
# App
PLUS_API_KEY: "{{ .PLUS_API_KEY }}"
# Mosquitto
FRIGATE_MQTT_USERNAME: "{{ .frigate_username }}"
FRIGATE_MQTT_PASSWORD: "{{ .frigate_password }}"
FRIGATE_MQTT_USERNAME: "{{ .user_mqtt_username }}"
FRIGATE_MQTT_PASSWORD: "{{ .user_mqtt_password }}"
FRIGATE_CAMERA_DOORBELL_HOST: 10.50.50.101
FRIGATE_CAMERA_DOORBELL_USER: admin
FRIGATE_CAMERA_DOORBELL_PASSWORD: "{{ .CAMERA_DOORBELL_PASSWORD }}"
Expand All @@ -32,4 +31,4 @@ spec:
- extract:
key: frigate
- extract:
key: mosquitto
key: EMQX
25 changes: 0 additions & 25 deletions kubernetes/cluster-0/apps/home/frigate/app/gatus.yaml

This file was deleted.

79 changes: 33 additions & 46 deletions kubernetes/cluster-0/apps/home/frigate/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,45 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/helm.toolkit.fluxcd.io/helmrelease_v2beta1.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: frigate
namespace: home
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.0.4
version: 3.5.1
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
controllers:
main:
type: statefulset
frigate:
annotations:
reloader.stakater.com/auto: "true"
secret.reloader.stakater.com/reload: frigate-secret
pod:
securityContext:
runAsUser: 2000
runAsGroup: 2000
fsGroup: 2000
fsGroupChangePolicy: OnRootMismatch
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values: ["plex"]
topologyKey: kubernetes.io/hostname
nodeSelector:
google.feature.node.kubernetes.io/coral: "true"

containers:
main:
app:
image:
repository: ghcr.io/blakeblackshear/frigate
tag: 0.13.0-beta3
Expand Down Expand Up @@ -65,47 +72,27 @@ spec:
memory: 2Gi
limits:
memory: 10Gi
pod:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values: ["plex"]
topologyKey: kubernetes.io/hostname
nodeSelector:
google.feature.node.kubernetes.io/coral: "true"
statefulset:
volumeClaimTemplates:
- name: config
accessMode: ReadWriteOnce
size: 5Gi
storageClass: ceph-block
globalMounts:
- path: /data
service:
main:
app:
controller: frigate
ports:
http:
port: *port
rtsp:
port: 8554
ingress:
main:
enabled: true
app:
className: internal-nginx
annotations:
external-dns.alpha.kubernetes.io/target: internal.holthome.net
hosts:
- host: &host "frigate.holthome.net"
paths:
- path: /
service:
name: main
identifier: app
port: http
tls:
- hosts:
- *host

persistence:
config-file:
type: configMap
Expand Down Expand Up @@ -135,5 +122,5 @@ spec:
nfs:
server: "nas.holthome.net"
path: /mnt/tank/share
mountPath: /media
readOnly: false
globalMounts:
- path: /media
5 changes: 2 additions & 3 deletions kubernetes/cluster-0/apps/home/frigate/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: home
resources:
- ./externalsecret.yaml
- ./helmrelease.yaml
- ./volsync.yaml
- ./gatus.yaml
- ../../../../templates/volsync
- ../../../../templates/gatus/guarded
configMapGenerator:
- name: frigate-configmap
files:
Expand Down
44 changes: 0 additions & 44 deletions kubernetes/cluster-0/apps/home/frigate/app/volsync.yaml

This file was deleted.

19 changes: 15 additions & 4 deletions kubernetes/cluster-0/apps/home/frigate/ks.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: frigate
name: &appname frigate
namespace: flux-system
spec:
targetNamespace: home
commonMetadata:
labels:
app.kubernetes.io/name: *appname
interval: 30m
path: ./kubernetes/cluster-0/apps/home/frigate/app
prune: true
sourceRef:
kind: GitRepository
name: k8s-gitops-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
dependsOn:
- name: external-secrets-stores
- name: node-feature-discovery-rules
postBuild:
substitute:
APP: *appname
HOSTNAME: frigate.holthome.net
# APP_UID: "0"
# APP_GID: "0"
VOLSYNC_CLAIM: frigate-config
VOLSYNC_CAPACITY: 5Gi

0 comments on commit 393bb34

Please sign in to comment.