feat(frigate): port to new common (#9141)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
Port Frigate to new common. This is a draft PR to for testing. Depending
on the errors generated, I may or may not be able to fix them (I don't
have any experience), so help might be needed from team members.

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Co-authored-by: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com>
This commit is contained in:
nautilus7
2023-06-01 23:49:06 +03:00
committed by GitHub
co-authored by Stavros Kois Kjeld Schouten StevenMcElligott
parent c1a7f0b6e3
commit 617f9d8aa8
6 changed files with 111 additions and 133 deletions
+2 -3
View File
@@ -3,7 +3,7 @@ appVersion: "0.11.1"
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.truecharts.org repository: https://library-charts.truecharts.org
version: 11.1.2 version: 12.10.2
deprecated: false deprecated: false
description: NVR With Realtime Object Detection for IP Cameras description: NVR With Realtime Object Detection for IP Cameras
home: https://truecharts.org/charts/incubator/frigate home: https://truecharts.org/charts/incubator/frigate
@@ -23,9 +23,8 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/frigate - https://github.com/truecharts/charts/tree/master/charts/incubator/frigate
- https://github.com/blakeblackshear/frigate - https://github.com/blakeblackshear/frigate
type: application type: application
version: 6.0.2 version: 7.0.0
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- nvr - nvr
truecharts.org/SCALE-support: "true" truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
+38 -43
View File
@@ -291,7 +291,7 @@ questions:
type: int type: int
min: 1 min: 1
max: 31 max: 31
default: 8 "null": true
- variable: mode - variable: mode
label: Mode label: Mode
description: | description: |
@@ -596,7 +596,7 @@ questions:
type: int type: int
min: 1 min: 1
max: 255 max: 255
default: 25 "null": true
- variable: contour_area - variable: contour_area
label: Contour Area label: Contour Area
description: | description: |
@@ -619,7 +619,7 @@ questions:
schema: schema:
type: string type: string
default: "" default: ""
valid_chars: '^[0-9]+(\.[0-9]*)?$' valid_chars: '^$|^[0-9]+(\.[0-9]*)?$'
- variable: frame_alpha - variable: frame_alpha
label: Frame Alpha label: Frame Alpha
description: | description: |
@@ -630,7 +630,7 @@ questions:
schema: schema:
type: string type: string
default: "" default: ""
valid_chars: '^[0-9]+(\.[0-9]*)?$' valid_chars: '^$|^[0-9]+(\.[0-9]*)?$'
- variable: frame_height - variable: frame_height
label: Frame Height label: Frame Height
description: | description: |
@@ -1436,33 +1436,28 @@ questions:
type: boolean type: boolean
default: true default: true
# Include{containerConfig} # Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot} # Include{serviceRoot}
- variable: main # Include{serviceMain}
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: main - variable: main
label: Main Service Port Configuration label: "Main Service Port Configuration"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: Port label: "Port"
description: This port exposes the container port on the service description: "This port exposes the container port on the service"
schema: schema:
type: int type: int
default: 10500 default: 10500
editable: true editable: true
required: true required: true
- variable: rtmp - variable: rtmp
label: RTMP Service label: "RTMP Service"
description: The service on which nodes connect to. description: "The service on which nodes connect to."
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1470,14 +1465,14 @@ questions:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: rtmp - variable: rtmp
label: RTMP Service Port Configuration label: "RTMP Service Port Configuration"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: Port label: "Port"
description: This port exposes the container port on the service description: "This port exposes the container port on the service"
schema: schema:
type: int type: int
default: 1935 default: 1935
@@ -1488,16 +1483,16 @@ questions:
# Include{serviceList} # Include{serviceList}
# Include{persistenceRoot} # Include{persistenceRoot}
- variable: media - variable: media
label: App Media label: "App Media"
description: Stores the Application Media description: "Stores the Application Media"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
- variable: db - variable: db
label: App DB label: "App DB"
description: Stores the Application DB description: "Stores the Application DB"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1506,7 +1501,7 @@ questions:
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
- variable: main - variable: main
label: Main Ingress label: "Main Ingress"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1517,28 +1512,28 @@ questions:
# Include{ingressAdvanced} # Include{ingressAdvanced}
# Include{ingressList} # Include{ingressList}
# Include{podSecurityContextRoot} # Include{securityContextRoot}
- variable: runAsUser - variable: runAsUser
label: runAsUser label: "runAsUser"
description: The UserID of the user running the application description: "The UserID of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 0
- variable: runAsGroup - variable: runAsGroup
label: runAsGroup label: "runAsGroup"
description: The groupID this App of the user running the application description: "The groupID this App of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 0
# Include{securityContextContainer} # Include{securityContextContainer}
# Include{securityContextAdvanced} # Include{securityContextAdvanced}
# Include{securityContextPod} # Include{securityContextPod}
- variable: fsGroup - variable: fsGroup
label: fsGroup label: "fsGroup"
description: The group that should own ALL storage. description: "The group that should own ALL storage."
schema: schema:
type: int type: int
default: 568 default: 568
# Include{resources} # Include{resources}
# Include{advanced} # Include{advanced}
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
@@ -1,16 +1,6 @@
{{/* Define the configmap */}} {{/* Define the configmap */}}
{{- define "frigate.configmap" -}} {{- define "frigate.configmap" -}}
enabled: true
{{- $configName := printf "%s-frigate-config" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data: data:
config.yml: | config.yml: |
database: database:
@@ -1,7 +1,11 @@
{{/* Make sure all variables are set properly */}} {{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }} {{- include "tc.v1.common.loader.init" . }}
{{- include "frigate.configmap" . -}} {{/* Render configmap for frigate */}}
{{- $config := include "frigate.configmap" . | fromYaml -}}
{{- if $config -}}
{{- $_ := set .Values.configmap "frigate-config" $config -}}
{{- end -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }} {{ include "tc.v1.common.loader.apply" . }}
+62 -73
View File
@@ -4,13 +4,11 @@ image:
tag: 0.11.1@sha256:8dd7273eebf396563d7bbc14778fd3d58c624e5063ffcf74b5b0afe63e7cdd7f tag: 0.11.1@sha256:8dd7273eebf396563d7bbc14778fd3d58c624e5063ffcf74b5b0afe63e7cdd7f
securityContext: securityContext:
readOnlyRootFilesystem: false container:
runAsNonRoot: false readOnlyRootFilesystem: false
runAsNonRoot: false
podSecurityContext: runAsUser: 0
runAsUser: 0 runAsGroup: 0
runAsGroup: 0
# -- The "render_config" key is only used internally to "render" or not the configuration # -- The "render_config" key is only used internally to "render" or not the configuration
# - Some parts of the config bellow are slightly modified so they can be added on SCALE UI. Mainly lists. # - Some parts of the config bellow are slightly modified so they can be added on SCALE UI. Mainly lists.
# - Do not blindly copy paste configuration from upstream. As this won't work on all cases # - Do not blindly copy paste configuration from upstream. As this won't work on all cases
@@ -31,16 +29,15 @@ frigate:
detectors: detectors:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
render_config: false render_config: false
config: config: []
[] # -- Required: Name of the detector
# -- Required: Name of the detector # - name: coral
# - name: coral # # -- Valid values are 'edgetpu' (requires device property below) and 'cpu'.
# # -- Valid values are 'edgetpu' (requires device property below) and 'cpu'. # type: edgetpu
# type: edgetpu # # -- Device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
# # -- Device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api # device: usb
# device: usb # # -- This value is only used for CPU types
# # -- This value is only used for CPU types # num_threads: 3
# num_threads: 3
model: model:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -54,12 +51,11 @@ frigate:
# -- Optional: Path to the labelmap # -- Optional: Path to the labelmap
labelmap_path: "" labelmap_path: ""
# -- Optional: Label name modifications. # -- Optional: Label name modifications.
labelmap: labelmap: []
[] # - model: "2"
# - model: "2" # name: vehicle
# name: vehicle # - model: 3
# - model: 3 # name: vehicle
# name: vehicle
logger: logger:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -67,10 +63,9 @@ frigate:
# -- Optional: Default log verbosity (default: shown below) # -- Optional: Default log verbosity (default: shown below)
default: info default: info
# -- Optional: Component specific logger overrides # -- Optional: Component specific logger overrides
logs: logs: []
[] # - component: frigate.event
# - component: frigate.event # verbosity: debug
# verbosity: debug
birdseye: birdseye:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -151,33 +146,31 @@ frigate:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
render_config: false render_config: false
# -- Optional: list of objects to track from labelmap.txt # -- Optional: list of objects to track from labelmap.txt
track: track: []
[] # - person
# - person # - car
# - car
# -- Optional: mask to prevent all object types from being detected in certain areas (default: no mask) # -- Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
# - Checks based on the bottom center of the bounding box of the object. # - Checks based on the bottom center of the bounding box of the object.
# - NOTE: This mask is COMBINED with the object type specific mask below # - NOTE: This mask is COMBINED with the object type specific mask below
mask: "" mask: ""
# - Optional: filters to reduce false positives for specific object types # - Optional: filters to reduce false positives for specific object types
filters: filters: []
[] # - object: person
# - object: person # # -- Optional: Minimum width*height of the bounding box for the detected object
# # -- Optional: Minimum width*height of the bounding box for the detected object # min_area: 5000
# min_area: 5000 # # -- Optional: Maximum width*height of the bounding box for the detected object
# # -- Optional: Maximum width*height of the bounding box for the detected object # max_area: 100000
# max_area: 100000 # # -- Optional: Minimum width/height of the bounding box for the detected object
# # -- Optional: Minimum width/height of the bounding box for the detected object # min_ratio: "0.5"
# min_ratio: "0.5" # # -- Optional: Maximum width/height of the bounding box for the detected object
# # -- Optional: Maximum width/height of the bounding box for the detected object # max_ratio: "2.0"
# max_ratio: "2.0" # # -- Optional: Minimum score for the object to initiate tracking
# # -- Optional: Minimum score for the object to initiate tracking # min_score: "0.5"
# min_score: "0.5" # # -- Optional: Minimum decimal percentage for tracked object's computed score to be considered a true positive
# # -- Optional: Minimum decimal percentage for tracked object's computed score to be considered a true positive # threshold: "0.7"
# threshold: "0.7" # # -- Optional: Mask to prevent this object type from being detected in certain areas
# # -- Optional: Mask to prevent this object type from being detected in certain areas # # - Checks based on the bottom center of the bounding box of the object
# # - Checks based on the bottom center of the bounding box of the object # mask: 0,0,1000,0,1000,200,0,200
# mask: 0,0,1000,0,1000,200,0,200
motion: motion:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -254,9 +247,8 @@ frigate:
# -- Optional: Number of seconds after the event to include # -- Optional: Number of seconds after the event to include
post_capture: null post_capture: null
# -- Optional: Objects to save recordings for. Defaults to all # -- Optional: Objects to save recordings for. Defaults to all
objects: objects: []
[] # - person
# - person
# -- Optional: Restrict recordings to objects that entered any of the listed zones # -- Optional: Restrict recordings to objects that entered any of the listed zones
required_zones: [] required_zones: []
# -- Optional: Retention settings for recordings of events # -- Optional: Retention settings for recordings of events
@@ -271,10 +263,9 @@ frigate:
# - active_objects - save all recording segments for event with active/moving objects # - active_objects - save all recording segments for event with active/moving objects
mode: "" mode: ""
# -- Optional: Per object retention days # -- Optional: Per object retention days
objects: objects: []
[] # - object: person
# - object: person # days: 15
# days: 15
snapshots: snapshots:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -301,10 +292,9 @@ frigate:
# -- Required: Default retention days (default: shown below) # -- Required: Default retention days (default: shown below)
default: 10 default: 10
# -- Optional: Per object retention days # -- Optional: Per object retention days
objects: objects: []
[] # - object: person
# - object: person # days: 15
# days: 15
rtmp: rtmp:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -398,17 +388,15 @@ frigate:
# - NOTE: Presence in a zone is evaluated only based on the bottom center of the objects bounding box. # - NOTE: Presence in a zone is evaluated only based on the bottom center of the objects bounding box.
coordinates: 545,1077,747,939,788,805 coordinates: 545,1077,747,939,788,805
# -- Optional: List of objects that can trigger this zone (default: all tracked objects) # -- Optional: List of objects that can trigger this zone (default: all tracked objects)
objects: objects: []
[] # - person
# - person
# -- Optional: Zone level object filters. # -- Optional: Zone level object filters.
# -NOTE: The global and camera filters are applied upstream. # -NOTE: The global and camera filters are applied upstream.
filters: filters: []
[] # - object: person
# - object: person # min_area: null
# min_area: null # max_area: null
# max_area: null # threshold: ""
# threshold: ""
# -- Optional: Configuration for the jpg snapshots published via MQTT # -- Optional: Configuration for the jpg snapshots published via MQTT
mqtt: mqtt:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -448,7 +436,7 @@ service:
ports: ports:
main: main:
port: 10500 port: 10500
protocol: HTTP protocol: http
targetPort: 5000 targetPort: 5000
rtmp: rtmp:
enabled: true enabled: true
@@ -480,11 +468,12 @@ persistence:
frigate-config: frigate-config:
enabled: true enabled: true
mountPath: /config mountPath: /config
type: configMap type: configmap
objectName: '{{ template "tc.common.names.fullname" . }}-frigate-config' objectName: frigate-config
items: items:
- key: config.yml - key: config.yml
path: config.yml path: config.yml
portal: portal:
enabled: true open:
enabled: true