From 6ac1219e30ecb2469ab670bd48ae2e985f57b327 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 14 Nov 2022 01:19:55 +0200 Subject: [PATCH] feat(frigate): initial rework (#4408) * feat(frigate): initial rework * some comment cleanup * add mqtt * update storage * add some UI * add ffmpeg * more * switch to custom defined configmap... * add models * add logger * add birdseye * add ffmpeg * fix UI * add detect * remove values * add ojbect * add motion * no default for some ints * add record * floats can't be strings ?>! * make confmap content a string * add snapshot and rtmp * add timestamp style * finito * port * stringify * stringify * precommit * add some required values for CI * emty lines * hmm * fix lint * don't install frigate on ci --- .github/ct-install.yaml | 2 + charts/incubator/frigate/Chart.yaml | 2 +- .../frigate/docs/installation-instructions.md | 11 + charts/incubator/frigate/questions.yaml | 1386 ++++++++++++++++- .../frigate/templates/_configmap.tpl | 356 +++++ .../incubator/frigate/templates/common.yaml | 2 + charts/incubator/frigate/values.yaml | 908 ++++++----- .../docs/installation-instructions.md | 33 +- 8 files changed, 2187 insertions(+), 513 deletions(-) create mode 100644 charts/incubator/frigate/docs/installation-instructions.md create mode 100644 charts/incubator/frigate/templates/_configmap.tpl diff --git a/.github/ct-install.yaml b/.github/ct-install.yaml index 7cc85697b21..a567c8291cc 100644 --- a/.github/ct-install.yaml +++ b/.github/ct-install.yaml @@ -29,6 +29,8 @@ excluded-charts: - charts/stable/zigbee2mqtt - charts/stable/alertmanager-bot - charts/stable/storj-node + - charts/incubator/frigate + - charts/stable/frigate - charts/stable/orbital-sync - charts/incubator/orbital-sync - charts/incubator/amcrest2mqtt diff --git a/charts/incubator/frigate/Chart.yaml b/charts/incubator/frigate/Chart.yaml index 803f79063f2..7932764d42b 100644 --- a/charts/incubator/frigate/Chart.yaml +++ b/charts/incubator/frigate/Chart.yaml @@ -24,7 +24,7 @@ sources: - https://github.com/blakeblackshear/frigate - https://hub.docker.com/r/blakeblackshear/frigate type: application -version: 3.0.4 +version: 4.0.0 annotations: truecharts.org/catagories: | - nvr diff --git a/charts/incubator/frigate/docs/installation-instructions.md b/charts/incubator/frigate/docs/installation-instructions.md new file mode 100644 index 00000000000..2cc75061d02 --- /dev/null +++ b/charts/incubator/frigate/docs/installation-instructions.md @@ -0,0 +1,11 @@ +# Installation instructions + +## Hardcoded values + +We hardcoded some values, so the chart/app can work correctly based on how it's written. +Those values are: + +```yaml +database: + path: /db/frigate.db +``` diff --git a/charts/incubator/frigate/questions.yaml b/charts/incubator/frigate/questions.yaml index 82d562da119..6f922d078b6 100644 --- a/charts/incubator/frigate/questions.yaml +++ b/charts/incubator/frigate/questions.yaml @@ -8,11 +8,1323 @@ questions: # Include{replicas} # Include{replica1} # Include{controllerExpertExtraArgs} + - variable: frigate + group: App Configuration + label: Frigate Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: mqtt + label: MQTT + schema: + additional_attrs: true + type: dict + attrs: + - variable: host + label: Host + schema: + type: string + required: true + default: "" + - variable: port + label: Port + schema: + type: int + required: true + default: 1883 + - variable: topic_prefix + label: Topic Prefix + description: Must be unique if you are running multiple instances + schema: + type: string + required: true + default: frigate + - variable: topic_prefix + label: Client ID + description: Must be unique if you are running multiple instances + schema: + type: string + required: true + default: frigate + - variable: stats_interval + label: Stats Interval + description: Interval in seconds for publishing stats + schema: + type: int + required: true + default: 60 + - variable: user + label: Username + schema: + type: string + default: "" + - variable: password + label: Password + schema: + type: string + private: true + default: "" + - variable: detectors + label: Detectors + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: config + label: Detectors Configuration + schema: + type: list + default: [] + items: + - variable: name + label: Name + description: Name of the detector + schema: + type: string + required: true + default: "" + - variable: type + label: Type + description: Name of the detector + schema: + type: string + required: true + default: cpu + enum: + - value: cpu + description: CPU + - value: edgetpu + description: Edge TPU + - variable: device + label: Device + description: Device name as defined here - https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api + schema: + type: string + default: "" + - variable: num_threads + label: Number of Threads + description: This value is only used for CPU types + schema: + type: int + show_if: [["type", "=", "cpu"]] + default: 3 + - variable: model + label: Model + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: path + label: Path + schema: + type: string + default: /edgetpu_model.tflite + - variable: labelmap_path + label: Label Map Path + schema: + type: string + default: /labelmap.txt + - variable: width + label: Width + schema: + type: int + default: 320 + - variable: height + label: Height + schema: + type: int + default: 320 + - variable: labelmap + label: LabelMap Configuration + schema: + type: list + default: [] + items: + - variable: labelmap_entry + label: LabelMap Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: model + label: Model + schema: + type: string + default: "" + - variable: name + label: Name + schema: + type: string + default: "" + - variable: logger + label: Logger + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: default + label: Default Log Verbosity + schema: + type: string + required: true + default: info + enum: + - value: info + description: Info + - value: debug + description: Debug + - value: warning + description: Warning + - value: error + description: Error + - value: critical + description: Critical + - variable: logs + label: Component Specific Logs + schema: + type: list + default: [] + items: + - variable: component_entry + label: Component Specific Log Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: component + label: Component + description: Find out the available components here https://docs.frigate.video/configuration/advanced/#logger + schema: + type: string + required: true + default: "" + - variable: verbosity + label: Default Log Verbosity + schema: + type: string + required: true + default: info + enum: + - value: info + description: Info + - value: debug + description: Debug + - value: warning + description: Warning + - value: error + description: Error + - value: critical + description: Critical + - variable: birdseye + label: Birds Eye + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: true + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: Enables the birdseye + schema: + type: boolean + default: true + - variable: width + label: Width + description: Width of the output resolution + schema: + type: int + required: true + default: 1280 + - variable: height + label: Height + description: Height of the output resolution + schema: + type: int + required: true + default: 720 + - variable: quality + label: Quality + description: Encoding quality of the mpeg1 feed. Where 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. + schema: + type: int + min: 1 + max: 31 + required: true + default: 8 + - variable: mode + label: Mode + description: | + Mode of the view. + Objects - Cameras are included if they have had a tracked object within the last 30 seconds. + Motion - Cameras are included if motion was detected in the last 30 seconds. + Continuous - All cameras are included always. + schema: + type: string + required: true + default: objects + enum: + - value: objects + description: Objects + - value: motion + description: Motion + - value: continuous + description: Continuous + - variable: ffmpeg + label: ffmpeg + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: global_args + label: Global Args + schema: + type: string + required: true + default: -hide_banner -loglevel warning + - variable: input_args + label: Input Args + schema: + type: string + required: true + default: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 + - variable: hwaccel_args + label: HW Acceleration Args + description: See hardware acceleration docs for your specific device + schema: + type: string + default: "" + - variable: output_args + label: Output Args + schema: + additional_attrs: true + type: dict + attrs: + - variable: detect + label: Detect + schema: + type: string + required: true + default: -f rawvideo -pix_fmt yuv420p + - variable: record + label: Record + schema: + type: string + required: true + default: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an + - variable: rtmp + label: RTMP + schema: + type: string + required: true + default: -c copy -f flv + - variable: detect + label: Detect + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: Enables detection for the cameras + schema: + type: boolean + default: true + - variable: width + label: Width + description: Width of the frame for the input with the detect role + schema: + type: int + required: true + default: 1280 + - variable: height + label: Height + description: Height of the frame for the input with the detect role + schema: + type: int + required: true + default: 720 + - variable: fps + label: FPS + description: Desired fps for your camera for the input with the detect role. Recommended value of 5. Ideally, try and reduce your FPS on the camera. + schema: + type: int + required: true + default: 5 + - variable: max_disappeared + label: Max Disappeared + description: Number of frames without a detection before frigate considers an object to be gone. + schema: + type: int + required: true + default: 25 + - variable: stationary + label: Stationary + schema: + additional_attrs: true + type: dict + attrs: + - variable: interval + label: Interval + description: | + Frequency for confirming stationary objects + When set to 0, object detection will not confirm stationary objects until movement is detected. + If set to 10, object detection will run to confirm the object still exists on every 10th frame. + schema: + type: int + required: true + default: 0 + - variable: threshold + label: Threshold + description: Number of frames without a position change for an object to be considered stationary + schema: + type: int + required: true + default: 50 + - variable: set_max_frames + label: Set Max Frames + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: max_frames + label: Max Frames + schema: + additional_attrs: true + type: dict + attrs: + - variable: default + label: Default + description: Default for all object types + schema: + type: int + "null": true + required: true + - variable: objects + label: Objects + schema: + type: list + default: [] + items: + - variable: object_entry + label: Object Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: object + label: Object + schema: + type: string + required: true + default: "" + - variable: frames + label: Frames + schema: + type: int + required: true + - variable: objects + label: Objects + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: track + label: Track + description: Objects to track from labelmap.txt + schema: + type: list + default: [] + items: + - variable: track_entry + label: Track Object Entry + schema: + type: string + required: true + default: "" + - variable: mask + label: Mask + description: | + Mask to prevent all object types from being detected in certain areas + Checks based on the bottom center of the bounding box of the object. + This mask is COMBINED with the object type specific mask below + schema: + type: string + default: "" + - variable: filters + label: Filters + description: Filters to reduce false positives for specific object types + schema: + type: list + default: [] + items: + - variable: filter_entry + label: Filter Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: object + label: Object + description: For example person + schema: + type: string + required: true + default: "" + - variable: min_area + label: Min Area + description: Minimum width*height of the bounding box for the detected object + schema: + type: int + "null": true + - variable: max_area + label: Max Area + description: Maximum width*height of the bounding box for the detected object + schema: + type: int + "null": true + - variable: min_ratio + label: Min Ratio + description: Minimum width/height of the bounding box for the detected object + schema: + type: int + "null": true + - variable: min_score + label: Min Score + description: Minimum score for the object to initiate tracking + schema: + type: int + "null": true + - variable: threshold + label: Threshold + description: Minimum decimal percentage for tracked object's computed score to be considered a true positive + schema: + type: int + "null": true + - variable: mask + label: Mask + description: | + 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 + schema: + type: string + default: "" + - variable: motion + label: Motion + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: threshold + label: Threshold + description: | + The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. + Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive. + schema: + type: int + min: 1 + max: 255 + default: 25 + - variable: contour_area + label: Contour Area + description: | + Minimum size in pixels in the resized motion image that counts as motion + Increasing this value will prevent smaller areas of motion from being detected. Decreasing will + make motion detection more sensitive to smaller moving objects. + As a rule of thumb: + 15 - high sensitivity + 30 - medium sensitivity + 50 - low sensitivity + schema: + type: int + default: 30 + - variable: delta_alpha + label: Delta Alpha + description: | + Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames + Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion. + Too low and a fast moving person wont be detected as motion. + schema: + type: string + default: "0.2" + - variable: frame_alpha + label: Frame Alpha + description: | + Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background + Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster. + Low values will cause things like moving shadows to be detected as motion for longer. + https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average + schema: + type: string + default: "0.2" + - variable: frame_height + label: Frame Height + description: | + Height of the resized motion frame + This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense + of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion. + schema: + type: int + default: 50 + - variable: mask + label: Mask + description: See docs for more detailed info on creating masks + schema: + type: string + default: "" + - variable: mask + label: Mask + description: Improve contrast. Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive for daytime. + schema: + type: boolean + default: false + - variable: mqtt_off_delay + label: MQTT Off Delay + description: Delay when updating camera motion through MQTT from ON -> OFF + schema: + type: int + default: 30 + - variable: record + label: Record + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: | + Enable recording + WARNING: If recording is disabled in the config, turning it on via the UI or MQTT later will have no effect. + WARNING: Frigate does not currently support limiting recordings based on available disk space automatically. + If using recordings,you must specify retention settings for a number of days that will fit within the available disk space of your drive or Frigate will crash. + schema: + type: boolean + default: true + - variable: expire_interval + label: Expire Interval + description: Number of minutes to wait between cleanup runs + schema: + type: int + required: true + default: 60 + - variable: retain + label: Retain + description: Retention settings for recording + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Retain Config + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: days + label: Days + description: | + Number of days to retain recordings regardless of events + NOTE: This should be set to 0 and retention should be defined in events section below if you only want to retain recordings of events. + schema: + type: int + required: true + default: 0 + - variable: mode + label: Mode + description: | + Mode for retention. + All - save all recording segments regardless of activity + Motion - save all recordings segments with any detected motion + Active Objects - save all recording segments with active/moving objects + NOTE: This mode only applies when the days setting above is greater than 0 + schema: + type: string + show_if: [["days", "!=", 0]] + required: true + default: all + enum: + - value: all + description: All + - value: motion + description: Motion + - value: active_objects + description: Active Objects + - variable: events + label: Events + description: Event recording settings + schema: + additional_attrs: true + type: dict + attrs: + - variable: pre_capture + label: Pre Capture + description: Number of seconds before the event to include + schema: + type: int + required: true + default: 5 + - variable: post_capture + label: Post Capture + description: Number of seconds after the event to include + schema: + type: int + required: true + default: 5 + - variable: objects + label: Objects + description: Objects to save recordings for. Defaults to all objects. + schema: + type: list + default: [] + items: + - variable: object_entry + label: Object Entry + schema: + type: string + required: true + default: "" + - variable: required_zones + label: Required Zones + description: Restrict recordings to objects that entered any of the listed zones + schema: + type: list + default: [] + items: + - variable: zone_entry + label: Zone Entry + schema: + type: string + required: true + default: "" + - variable: retain + label: Retain + description: Retention settings for recordings of events + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Retain Config + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: default + label: Default + description: Default retention days + schema: + type: int + required: true + default: 10 + - variable: mode + label: Mode + description: | + Mode for retention. + All - save all recording segments for events regardless of activity + Motion - save all recordings segments for events with any detected motion + Active Objects - save all recording segments for event with active/moving objects + schema: + type: string + required: true + default: motion + enum: + - value: all + description: All + - value: motion + description: Motion + - value: active_objects + description: Active Objects + - variable: objects + label: Objects + description: Per object retention days + schema: + type: list + default: [] + items: + - variable: objects_entry + label: Objects Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: object + label: Object + description: For example Person + schema: + type: string + required: true + default: "" + - variable: days + label: Retention Days + description: Retention days for the object + schema: + type: int + required: true + default: 15 + - variable: snapshots + label: Snapshots + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: | + Optional: Enable writing jpg snapshot to /media/frigate/clips + This value can be set via MQTT and will be updated in startup based on retained value + schema: + type: boolean + default: true + - variable: clean_copy + label: Clean Copy + description: Save a clean PNG copy of the snapshot image + schema: + type: boolean + default: true + - variable: timestamp + label: Timestamp + description: Print a timestamp on the snapshots + schema: + type: boolean + default: false + - variable: bounding_box + label: Bounding Box + description: Draw bounding box on the snapshots + schema: + type: boolean + default: false + - variable: crop + label: Crop + description: Crop the snapshot + schema: + type: boolean + default: false + - variable: height + label: Height + description: Height to resize the snapshot to + schema: + type: int + "null": true + - variable: required_zones + label: Required Zones + description: Restrict recordings to objects that entered any of the listed zones + schema: + type: list + default: [] + items: + - variable: zone_entry + label: Zone Entry + schema: + type: string + required: true + default: "" + - variable: retain + label: Retain + description: Retention settings for recordings of events + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Retain Config + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: default + label: Default + description: Default retention days + schema: + type: int + required: true + default: 10 + - variable: objects + label: Objects + description: Per object retention days + schema: + type: list + default: [] + items: + - variable: objects_entry + label: Objects Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: object + label: Object + description: For example Person + schema: + type: string + required: true + default: "" + - variable: days + label: Retention Days + description: Retention days for the object + schema: + type: int + required: true + default: 15 + - variable: rtmp + label: RTMP + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: Enable the RTMP stream + schema: + type: boolean + default: true + - variable: live + label: Live + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: height + label: Height + description: | + Set the height of the live stream. + This must be less than or equal to the height of the detect stream. Lower resolutions + reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio. + schema: + type: int + required: true + default: 720 + - variable: quality + label: Quality + description: | + Set the encode quality of the live stream + 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. + schema: + type: int + required: true + min: 1 + max: 31 + default: 8 + - variable: timestamp_style + label: Timestamp Style + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: position + label: Position + description: Position of the timestamp + schema: + type: string + required: true + default: tl + enum: + - value: tl + description: Top Left + - value: tr + description: Top Right + - value: bl + description: Bottom Left + - value: br + description: Bottom Right + - variable: format + label: Format + description: Format specifier conform to the Python package "datetime" + schema: + type: string + required: true + default: "%m/%d/%Y %H:%M:%S" + - variable: color + label: Color + schema: + additional_attrs: true + type: dict + attrs: + - variable: red + label: Red + schema: + type: int + default: 255 + required: true + - variable: green + label: Green + schema: + type: int + required: true + default: 255 + - variable: blue + label: Blue + schema: + type: int + required: true + default: 255 + - variable: thickness + label: Thickness + description: Line thickness of font + schema: + type: int + required: true + default: 2 + - variable: effect + label: Effect + description: | + Effect of lettering + None - No effect + Solid - Solid background in inverse color of font + Shadow - Shadow for font + schema: + type: string + required: true + default: None + enum: + - value: None + description: None + - value: solid + description: Solid + - value: shadow + description: Shadow + - variable: cameras + label: Cameras + schema: + type: list + default: [] + items: + - variable: camera_entry + label: Camera Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: camera_name + label: Camera Name + schema: + type: string + required: true + default: "" + - variable: ffmpeg + label: ffmpeg + description: ffmpeg Settings for the camera + schema: + additional_attrs: true + type: dict + attrs: + - variable: inputs + label: Inputs + description: A list of input streams for the camera. See documentation for more information. + schema: + type: list + required: true + default: [] + items: + - variable: input_entry + label: Input Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: path + label: Path + description: The path to the stream + schema: + type: string + required: true + default: "" + - variable: roles + label: Roles + schema: + type: list + required: true + default: [] + items: + - variable: role_entry + label: Role Entry + schema: + type: string + required: true + default: "" + enum: + - value: detect + description: Detect + - value: rtmp + description: RTMP + - value: record + description: Record + - variable: global_args + label: Global Args + description: Camera specific global args + schema: + type: string + default: "" + - variable: hwaccel_args + label: HW Acceleration Args + description: Camera specific hwaccel args + schema: + type: string + default: "" + - variable: input_args + label: Input Args + description: Camera specific input args + schema: + type: string + default: "" + - variable: output_args + label: Output Args + description: Camera specific output args + schema: + type: string + default: "" + - variable: best_image_timeout + label: Best Image Timeout + description: Timeout for highest scoring image before allowing it to be replaced by a newer image. + schema: + type: int + required: true + default: 60 + - variable: zones + label: Zones + description: Zones for this camera + schema: + type: list + default: [] + items: + - variable: zone_entry + label: Zone Entry + schema: + additional_attrs: true + type: dict + attrs: + - variable: name + label: Zone Name + schema: + type: string + required: true + default: "" + - variable: coordinates + label: Coordinates + schema: + type: string + required: true + default: "" + - variable: objects + label: Objects + schema: + type: list + default: [] + items: + - variable: object_entry + label: Object Entry + description: For example person + schema: + type: string + required: true + default: "" + - variable: mqtt + label: MQTT + description: MQTT Configuration for jpg snapshots published for this camera + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + description: | + Enable publishing snapshot via mqtt for camera + NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'. + All other messages will still be published. + schema: + type: boolean + default: true + - variable: timestamp + label: Timestamp + description: Print a timestamp on the snapshots + schema: + type: boolean + default: true + - variable: bounding_box + label: Bounding Box + description: Draw bounding box on the snapshots + schema: + type: boolean + default: true + - variable: crop + label: Crop + description: Crop the snapshot + schema: + type: boolean + default: true + - variable: height + label: Height + description: Height to resize the snapshot to + schema: + type: int + required: true + default: 720 + - variable: quality + label: Quality + description: JPEG encode quality + schema: + type: int + required: true + default: 70 + - variable: required_zones + label: Required Zones + description: Restrict mqtt messages to objects that entered any of the listed zones + schema: + type: list + default: [] + items: + - variable: required_zone + label: Required Zone + schema: + type: string + required: true + default: "" + - variable: ui + label: UI + description: Configuration for how camera is handled in the GUI. + schema: + additional_attrs: true + type: dict + attrs: + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: order + label: order + description: Adjust sort order of cameras in the UI. Larger numbers come later By default the cameras are sorted alphabetically. + schema: + "null": true + type: int + - variable: dashboard + label: Dashboard + description: Whether or not to show the camera in the Frigate UI + schema: + type: boolean + default: true # Include{containerConfig} # Include{serviceRoot} - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" + label: Main Service + description: The Primary service on which the healthcheck runs, often the webUI schema: additional_attrs: true type: dict @@ -20,22 +1332,22 @@ questions: # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main - label: "Main Service Port Configuration" + label: Main Service Port Configuration schema: additional_attrs: true type: dict attrs: - variable: port - label: "Port" - description: "This port exposes the container port on the service" + label: Port + description: This port exposes the container port on the service schema: type: int - default: 5000 + default: 10500 editable: true required: true - variable: rtmp - label: "RTMP Service" - description: "The service on which nodes connect to." + label: RTMP Service + description: The service on which nodes connect to. schema: additional_attrs: true type: dict @@ -43,14 +1355,14 @@ questions: # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: rtmp - label: "RTMP Service Port Configuration" + label: RTMP Service Port Configuration schema: additional_attrs: true type: dict attrs: - variable: port - label: "Port" - description: "This port exposes the container port on the service" + label: Port + description: This port exposes the container port on the service schema: type: int default: 1935 @@ -61,25 +1373,17 @@ questions: # Include{serviceExpert} # Include{serviceList} # Include{persistenceRoot} - - variable: config - label: "App Config Storage" - description: "Stores the Application Configuration." + - variable: media + label: App Media + description: Stores the Application Media schema: additional_attrs: true type: dict attrs: # Include{persistenceBasic} - - variable: cache - label: "Video Cache in Memory" - description: "Stores the cached video data." - schema: - additional_attrs: true - type: dict - attrs: -# Include{persistenceBasic} - - variable: cache - label: "App Transcode cache" - description: "Stores the Application Transcode cache." + - variable: db + label: App DB + description: Stores the Application DB schema: additional_attrs: true type: dict @@ -88,17 +1392,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: -# Include{ingressDefault} -# Include{ingressTLS} -# Include{ingressTraefik} -# Include{ingressList} - - variable: rtmp - label: "RTMP Ingress" + label: Main Ingress schema: additional_attrs: true type: dict @@ -110,41 +1404,41 @@ questions: # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: false - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: false - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: false - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: false # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + label: runAsUser + description: The UserID of the user running the application schema: type: int default: 0 - variable: runAsGroup - label: "runAsGroup" - description: "The groupID this App of the user running the application" + label: runAsGroup + description: The groupID this App of the user running the application schema: type: int default: 0 - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/incubator/frigate/templates/_configmap.tpl b/charts/incubator/frigate/templates/_configmap.tpl new file mode 100644 index 00000000000..6ad5dbdd7b8 --- /dev/null +++ b/charts/incubator/frigate/templates/_configmap.tpl @@ -0,0 +1,356 @@ +{{/* Define the configmap */}} +{{- define "frigate.configmap" -}} + +{{- $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: + config.yml: | + database: + path: /db/frigate.db + mqtt: + host: {{ required "You need to provide an MQTT host" .Values.frigate.mqtt.host }} + port: {{ .Values.frigate.mqtt.port | default 1883 }} + topic_prefix: {{ .Values.frigate.mqtt.topic_prefix | default "frigate" }} + client_id: {{ .Values.frigate.mqtt.client_id | default "frigate" }} + stats_interval: {{ .Values.frigate.mqtt.stats_interval| default 60 }} + {{- with .Values.frigate.mqtt.user }} + user: {{ . }} + {{- end }} + {{- with .Values.frigate.mqtt.password }} + password: {{ . }} + {{- end }} + + {{- if .Values.frigate.detectors.enabled }} + {{- if .Values.frigate.detectors.config }} + detectors: + {{- range .Values.frigate.detectors.config }} + {{ required "You need to provide a detector name" .name }}: + type: {{ .type }} + {{- with .device }} + device: {{ . }} + {{- end }} + {{- with .num_threads }} + num_threads: {{ . }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.model.render_config }} + model: + {{- with .Values.frigate.model.path }} + path: {{ . }} + {{- end }} + {{- with .Values.frigate.model.labelmap_path }} + path: {{ . }} + {{- end }} + width: {{ .Values.frigate.model.width | default 320 }} + height: {{ .Values.frigate.model.height | default 320 }} + {{- with .Values.frigate.model.labelmap }} + labelmap: + {{- range . }} + {{ .model }}: {{ .name }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.logger.render_config }} + logger: + default: {{ .Values.frigate.logger.default | default "info" }} + {{- with .Values.frigate.logger.logs }} + logs: + {{- range . }} + {{ .component }}: {{ .verbosity }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.birdseye.render_config }} + birdseye: + enabled: {{ ternary "True" "False" .Values.frigate.birdseye.enabled }} + width: {{ .Values.frigate.birdseye.width | default 1280 }} + height: {{ .Values.frigate.birdseye.height | default 720 }} + quality: {{ .Values.frigate.birdseye.quality | default 8 }} + model: {{ .Values.frigate.birdseye.mode | default "objects" }} + {{- end }} + + {{- if .Values.frigate.ffmpeg.render_config }} + ffmpeg: + global_args: {{ .Values.frigate.ffmpeg.global_args | default "-hide_banner -loglevel warning" }} + input_args: {{ .Values.frigate.ffmpeg.input_args | default "-avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1" }} + {{- with .Values.frigate.ffmpeg.hwaccel_args }} + hwaccel_args: {{ . }} + {{- end }} + output_args: + detect: {{ .Values.frigate.ffmpeg.output_args.detect | default "-f rawvideo -pix_fmt yuv420p" }} + record: {{ .Values.frigate.ffmpeg.output_args.detect | default "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an" }} + rtmp: {{ .Values.frigate.ffmpeg.output_args.detect | default "-c copy -f flv" }} + {{- end }} + + {{- if .Values.frigate.detect.render_config }} + detect: + enabled: {{ ternary "True" "False" .Values.frigate.detect.enabled }} + width: {{ .Values.frigate.detect.width | default 1280 }} + width: {{ .Values.frigate.detect.height | default 720 }} + fps: {{ .Values.frigate.detect.fps | default 5 }} + max_disappeared: {{ .Values.frigate.detect.max_disappeared | default 25 }} + stationary: + interval: {{ .Values.frigate.detect.stationary.interval | default 0 }} + threshold: {{ .Values.frigate.detect.stationary.threshold | default 50 }} + {{- if (hasKey .Values.frigate.detect.stationary "max_frames") }} + {{- if or (hasKey .Values.frigate.detect.stationary.max_frames "default") (hasKey .Values.frigate.detect.stationary.max_frames "objects") }} + max_frames: + {{- with .Values.frigate.detect.stationary.max_frames.default }} + default: {{ . }} + {{- end }} + {{- with .Values.frigate.detect.stationary.max_frames.objects }} + objects: + {{- range . }} + {{ .object }}: {{ .frames }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.objects.render_config }} + objects: + {{- with .Values.frigate.objects.track }} + track: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + {{- with .Values.frigate.objects.mask }} + mask: {{ . }} + {{- end }} + {{- with .Values.frigate.objects.filters }} + filters: + {{- range . }} + {{ .object }}: + {{- with .min_area }} + min_area: {{ . }} + {{- end }} + {{- with .max_area }} + max_area: {{ . }} + {{- end }} + {{- with .min_ratio }} + min_ratio: {{ . }} + {{- end }} + {{- with .max_ratio }} + max_ratio: {{ . }} + {{- end }} + {{- with .min_score }} + min_score: {{ . }} + {{- end }} + {{- with .threshold }} + threshold: {{ . }} + {{- end }} + {{- with .mask }} + mask: {{ . }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.motion.render_config }} + motion: + threshold: {{ .Values.frigate.motion.threshold | default 25 }} + contour_area: {{ .Values.frigate.motion.contour_area | default 30 }} + delta_alpha: {{ .Values.frigate.motion.delta_alpha | default 0.2 }} + frame_alpha: {{ .Values.frigate.motion.frame_alpha | default 0.2 }} + frame_height: {{ .Values.frigate.motion.frame_height | default 50 }} + {{- with .Values.frigate.motion.mask }} + mask: {{ . }} + {{- end }} + improve_contrast: {{ ternary "True" "False" .Values.frigate.motion.improve_contrast }} + mqtt_off_delay: {{ .Values.frigate.motion.mqtt_off_delay | default 30 }} + {{- end }} + + {{- if .Values.frigate.record.render_config }} + record: + enable: {{ ternary "True" "False" .Values.frigate.record.enabled }} + expire_interval: {{ .Values.frigate.record.expire_interval | default 60 }} + {{- if .Values.frigate.record.retain.render_config }} + retain: + days: {{ .Values.frigate.record.retain.days | default 0 }} + mode: {{ .Values.frigate.record.retain.mode | default "all" }} + {{- end }} + events: + pre_capture: {{ .Values.frigate.record.events.pre_capture | default 5 }} + post_capture: {{ .Values.frigate.record.events.post_capture | default 5 }} + {{- with .Values.frigate.record.events.objects }} + objects: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + {{- with .Values.frigate.record.events.required_zones }} + required_zones: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + {{- if .Values.frigate.record.events.retain.render_config }} + retain: + default: {{ .Values.frigate.record.events.retain.default | default 10 }} + mode: {{ .Values.frigate.record.events.retain.mode | default "motion" }} + {{- with .Values.frigate.record.events.retain.objects }} + objects: + {{- range . }} + {{ .object }}: {{ .days }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.snapshots.render_config }} + snapshots: + enabled: {{ ternary "True" "False" .Values.frigate.snapshots.enabled }} + clean_copy: {{ ternary "True" "False" .Values.frigate.snapshots.clean_copy }} + timestamp: {{ ternary "True" "False" .Values.frigate.snapshots.timestamp }} + bounding_box: {{ ternary "True" "False" .Values.frigate.snapshots.bounding_box }} + crop: {{ ternary "True" "False" .Values.frigate.snapshots.crop }} + {{- with .Values.frigate.snapshots.height }} + height: {{ . }} + {{- end }} + {{- with .Values.frigate.snapshots.required_zones }} + required_zones: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + {{- if .Values.frigate.snapshots.retain.render_config }} + retain: + default: {{ .Values.frigate.snapshots.retain.default | default 10 }} + {{- with .Values.frigate.snapshots.retain.objects }} + objects: + {{- range . }} + {{ .object }}: {{ .days }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.frigate.rtmp.render_config }} + rtmp: + enabled: {{ ternary "True" "False" .Values.frigate.rtmp.enabled }} + height: {{ .Values.frigate.live.height | default 720 }} + quality: {{ .Values.frigate.live.height | default 8 }} + {{- end }} + + {{- if .Values.frigate.timestamp_style.render_config }} + timestamp_style: + position: {{ .Values.frigate.timestamp_style.position | default "tl" }} + format: {{ .Values.frigate.timestamp_style.format | quote }} + color: + red: {{ .Values.frigate.timestamp_style.color.red | default 255 }} + green: {{ .Values.frigate.timestamp_style.color.green | default 255 }} + blue: {{ .Values.frigate.timestamp_style.color.blue | default 255 }} + thickness: {{ .Values.frigate.timestamp_style.thickness | default 2 }} + effect: {{ .Values.frigate.timestamp_style.effect | default "None" }} + {{- end }} + + cameras: + {{- range .Values.frigate.cameras }} + {{ .camera_name }}: + ffmpeg: + {{- with .ffmpeg }} + inputs: + {{- range .inputs }} + - path: {{ .path }} + {{- with .roles }} + roles: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} {{/* end with roles*/}} + {{- with .global_args }} + global_args: {{ . }} + {{- end }} + {{- with .hwaccel_args }} + hwaccel_args: {{ . }} + {{- end }} + {{- with .input_args }} + input_args: {{ . }} + {{- end }} + {{- end }} {{/* end range inputs */}} + {{- with .global_args }} + global_args: {{ . }} + {{- end }} + {{- with .hwaccel_args }} + hwaccel_args: {{ . }} + {{- end }} + {{- with .input_args }} + input_args: {{ . }} + {{- end }} + {{- with .output_args }} + output_args: {{ . }} + {{- end }} + {{- end }} {{/* end with ffmpeg */}} + best_image_timeout: {{ .best_image_timeout | default 60 }} + {{- with .zones }} + zones: + {{- range . }} + {{ .name }}: + coordinates: {{ required "You have to specify coordinates" .coordinates }} + {{- with .objects }} + objects: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} {{/* end with objects*/}} + {{- with .filters }} + filters: + {{- range . }} + {{ .object }}: + {{- with .min_area }} + min_area: {{ . }} + {{- end }} + {{- with .max_area }} + max_area: {{ . }} + {{- end }} + {{- with .threshold }} + threshold: {{ . }} + {{- end }} + {{- end }} {{/* end range filters */}} + {{- end }} {{/* end with filter */}} + {{- end }} {{/* end range zones */}} + {{- end }} {{/* end with zones */}} + {{- if .mqtt.render_config }} + {{- with .mqtt }} + mqtt: + enabled: {{ ternary "True" "False" .enabled }} + timestamp: {{ ternary "True" "False" .timestamp }} + bounding_box: {{ ternary "True" "False" .bounding_box }} + crop: {{ ternary "True" "False" .crop }} + height: {{ .height | default 270 }} + quality: {{ .quality | default 70 }} + {{- with .required_zones }} + required_zones: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + {{- end }} {{/* end with mqtt */}} + {{- end }} {{/* end if mqtt.render_config */}} + {{- if .ui.render_config }} + {{- with .ui }} + ui: + {{- if or .order (eq (int .order) 0) }} + order: {{ .order }} + {{- end }} + dashboard: {{ ternary "True" "False" .dashboard }} + {{- end }} {{/* end with ui */}} + {{- end }} {{/* end if ui.render_config */}} + {{- end }} {{/* end range cameras */}} + +{{- end }} diff --git a/charts/incubator/frigate/templates/common.yaml b/charts/incubator/frigate/templates/common.yaml index b9e7208f382..1f8971b2d42 100644 --- a/charts/incubator/frigate/templates/common.yaml +++ b/charts/incubator/frigate/templates/common.yaml @@ -1,5 +1,7 @@ {{/* Make sure all variables are set properly */}} {{- include "tc.common.loader.init" . }} +{{- include "frigate.configmap" . -}} + {{/* Render the templates */}} {{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/frigate/values.yaml b/charts/incubator/frigate/values.yaml index 989ea10ebf6..f009c96ebe9 100644 --- a/charts/incubator/frigate/values.yaml +++ b/charts/incubator/frigate/values.yaml @@ -1,492 +1,472 @@ image: - repository: tccr.io/truecharts/frigate-nvidia + repository: tccr.io/truecharts/frigate pullPolicy: IfNotPresent - tag: latest@sha256:9facc1383ebbf148873bcc2fba501868b0e09417cffff7f6c06fb31b9c9b95ec + tag: 0.11.1@sha256:8dd7273eebf396563d7bbc14778fd3d58c624e5063ffcf74b5b0afe63e7cdd7f securityContext: readOnlyRootFilesystem: false runAsNonRoot: false -configmap: - config: - enabled: true - data: - config.yml: | - mqtt: - # Required: host name - host: {{ .Values.frigate.mqtt.host }} - # Optional: port (default: shown below) - port: {{ .Values.frigate.mqtt.port }} - # Optional: topic prefix (default: shown below) - # NOTE: must be unique if you are running multiple instances - topic_prefix: frigate - # Optional: client id (default: shown below) - # NOTE: must be unique if you are running multiple instances - client_id: frigate - {{- if .Values.frigate.mqtt.authenticated }} - user: {{ .Values.frigate.mqtt.username }} - password: {{ .Values.frigate.mqtt.password }} - # Optional: user - # user: mqtt_user - # Optional: password - # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'. - # e.g. password: '{FRIGATE_MQTT_PASSWORD}' - # password: password - {{- end }} - # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None) - # tls_ca_certs: /path/to/ca.crt - # Optional: tls_client_cert and tls_client key in order to use self-signed client - # certificates (default: None) - # NOTE: certificate must not be password-protected - # do not set user and password when using a client certificate - # tls_client_cert: /path/to/client.crt - # tls_client_key: /path/to/client.key - # Optional: tls_insecure (true/false) for enabling TLS verification of - # the server hostname in the server certificate (default: None) - # tls_insecure: false - # Optional: interval in seconds for publishing stats (default: shown below) - stats_interval: 60 - - # Optional: Detectors configuration. Defaults to a single CPU detector - detectors: - # Required: name of the detector - {{- if .Values.persistence.coral }} - {{- if .Values.persistence.coral.enabled }} - coral: - # Required: type of the detector - # Valid values are 'edgetpu' (requires device property below) and 'cpu'. - type: edgetpu - # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api - device: usb - {{- else }} - cpu1: - type: cpu - # Optional: num_threads value passed to the tflite.Interpreter (default: shown below) - # This value is only used for CPU types - num_threads: 2 - {{- end }} - {{- end }} - - # Optional: Database configuration - # database: - # The path to store the SQLite DB (default: shown below) - # path: /media/frigate/frigate.db - - # Optional: model modifications - # model: - # Optional: path to the model (default: automatic based on detector) - # path: /edgetpu_model.tflite - # Optional: path to the labelmap (default: shown below) - # labelmap_path: /labelmap.txt - # Required: Object detection model input width (default: shown below) - # width: 320 - # Required: Object detection model input height (default: shown below) - # height: 240 - # Optional: Label name modifications. These are merged into the standard labelmap. - # labelmap: - # 2: vehicle - - # Optional: logger verbosity settings - logger: - # Optional: Default log verbosity (default: shown below) - default: info - # Optional: Component specific logger overrides - # logs: - # frigate.event: info - - # Optional: set environment variables - # environment_vars: - # EXAMPLE_VAR: value - - # Optional: birdseye configuration - birdseye: - # Optional: Enable birdseye view (default: shown below) - enabled: {{ .Values.frigate.birdseye.enabled }} - # Optional: Width of the output resolution (default: shown below) - width: 1280 - # Optional: Height of the output resolution (default: shown below) - height: 720 - # Optional: Encoding quality of the mpeg1 feed (default: shown below) - # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. - quality: 8 - # Optional: Mode of the view. Available options are: objects, motion, and continuous - # objects - cameras are included if they have had a tracked object within the last 30 seconds - # motion - cameras are included if motion was detected in the last 30 seconds - # continuous - all cameras are included always - mode: {{ .Values.frigate.birdseye.mode }} - - # Optional: ffmpeg configuration - ffmpeg: - # Optional: global ffmpeg args (default: shown below) warning instead of debug - global_args: -hide_banner -loglevel debug - # Optional: global hwaccel args (default: shown below) - # NOTE: See hardware acceleration docs for your specific device - # hwaccel_args: [] - # Optional: global input args (default: shown below) - # input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 - # Optional: global output args - # output_args: - # Optional: output args for detect streams (default: shown below) - # detect: -f rawvideo -pix_fmt yuv420p - # Optional: output args for record streams (default: shown below) - # record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an - # Optional: output args for rtmp streams (default: shown below) - # rtmp: -c copy -f flv - - # Optional: Detect configuration - # NOTE: Can be overridden at the camera level - detect: - # Optional: width of the frame for the input with the detect role (default: shown below) - width: 1280 - # Optional: height of the frame for the input with the detect role (default: shown below) - height: 720 - # Optional: desired fps for your camera for the input with the detect role (default: shown below) - # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera. - fps: 5 - # Optional: enables detection for the camera (default: True) - # This value can be set via MQTT and will be updated in startup based on retained value - enabled: True - # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate) - # max_disappeared: 25 - # Optional: Frequency for running detection on stationary objects (default: 10x the frame rate) - # stationary_interval: 50 - - # Optional: Object configuration - # NOTE: Can be overridden at the camera level - objects: - # Optional: list of objects to track from labelmap.txt (default: shown below) - track: - - person - - car - - motorcyle - - cat - - dog - # 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. - # NOTE: This mask is COMBINED with the object type specific mask below - # mask: 0,0,1000,0,1000,200,0,200 - # Optional: filters to reduce false positives for specific object types - filters: - person: - # Optional: minimum width*height of the bounding box for the detected object (default: 0) - min_area: 5000 - # Optional: maximum width*height of the bounding box for the detected object (default: 24000000) - max_area: 100000 - # Optional: minimum score for the object to initiate tracking (default: shown below) - # min_score: 0.5 - # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below) - # threshold: 0.7 - # Optional: mask to prevent this object type from being detected in certain areas (default: no mask) - # Checks based on the bottom center of the bounding box of the object - # mask: 0,0,1000,0,1000,200,0,200 - - # Optional: Motion configuration - # NOTE: Can be overridden at the camera level - motion: - # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below) - # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive. - # The value should be between 1 and 255. - # threshold: 25 - # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30) - # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will - # make motion detection more sensitive to smaller moving objects. - # As a rule of thumb: - # - 15 - high sensitivity - # - 30 - medium sensitivity - # - 50 - low sensitivity - contour_area: 30 - # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below) - # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion. - # Too low and a fast moving person wont be detected as motion. - # delta_alpha: 0.2 - # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below) - # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster. - # Low values will cause things like moving shadows to be detected as motion for longer. - # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/ - # frame_alpha: 0.2 - # Optional: Height of the resized motion frame (default: 50) - # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense - # of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion. - # frame_height: 50 - # Optional: motion mask - # NOTE: see docs for more detailed info on creating masks - # mask: 0,900,1080,900,1080,1920,0,1920 - - # Optional: Record configuration - # NOTE: Can be overridden at the camera level - record: - # Optional: Enable recording (default: shown below) - enabled: False - # Optional: Retention settings for recording - retain: - # Optional: Number of days to retain recordings regardless of events (default: shown below) - # NOTE: This should be set to 0 and retention should be defined in events section below - # if you only want to retain recordings of events. - days: 7 - # Optional: Mode for retention. Available options are: all, motion, and active_objects - # all - save all recording segments regardless of activity - # motion - save all recordings segments with any detected motion - # active_objects - save all recording segments with active/moving objects - # NOTE: this mode only applies when the days setting above is greater than 0 - mode: motion - # Optional: Event recording settings - events: - # Optional: Maximum length of time to retain video during long events. (default: shown below) - # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings - # will be the last x seconds of the event unless retain->days under record is > 0. - max_seconds: 300 - # Optional: Number of seconds before the event to include (default: shown below) - pre_capture: 5 - # Optional: Number of seconds after the event to include (default: shown below) - post_capture: 5 - # Optional: Objects to save recordings for. (default: all tracked objects) - # objects: - # - person - # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones) - # required_zones: [] - # Optional: Retention settings for recordings of events - retain: - # Required: Default retention days (default: shown below) - default: 14 - # Optional: Mode for retention. (default: shown below) - # all - save all recording segments for events regardless of activity - # motion - save all recordings segments for events with any detected motion - # active_objects - save all recording segments for event with active/moving objects - # - # NOTE: If the retain mode for the camera is more restrictive than the mode configured - # here, the segments will already be gone by the time this mode is applied. - # For example, if the camera retain mode is "motion", the segments without motion are - # never stored, so setting the mode to "all" here won't bring them back. - mode: active_objects - # Optional: Per object retention days - # objects: - # person: 15 - - # Optional: Configuration for the jpg snapshots written to the clips directory for each event - # NOTE: Can be overridden at the camera level - snapshots: - # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below) - # This value can be set via MQTT and will be updated in startup based on retained value - enabled: False - # Optional: print a timestamp on the snapshots (default: shown below) - # timestamp: False - # Optional: draw bounding box on the snapshots (default: shown below) - # bounding_box: False - # Optional: crop the snapshot (default: shown below) - # crop: False - # Optional: height to resize the snapshot to (default: original size) - # height: 175 - # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones) - required_zones: [] - # Optional: Camera override for retention settings (default: global values) - retain: - # Required: Default retention days (default: shown below) - default: 10 - # Optional: Per object retention days - objects: - person: 15 - - # Optional: RTMP configuration - # NOTE: Can be overridden at the camera level - rtmp: - # Optional: Enable the RTMP stream (default: True) - enabled: True - - # Optional: Live stream configuration for WebUI - # NOTE: Can be overridden at the camera level - live: - # Optional: Set the height of the live stream. (default: 720) - # This must be less than or equal to the height of the detect stream. Lower resolutions - # reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio. - # height: 720 - # Optional: Set the encode quality of the live stream (default: shown below) - # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. - quality: 8 - - # Optional: in-feed timestamp style configuration - # NOTE: Can be overridden at the camera level - # timestamp_style: - # Optional: Position of the timestamp (default: shown below) - # "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right) - # position: "tl" - # Optional: Format specifier conform to the Python package "datetime" (default: shown below) - # Additional Examples: - # german: "%d.%m.%Y %H:%M:%S" - # format: "%m/%d/%Y %H:%M:%S" - # Optional: Color of font - # color: - # All Required when color is specified (default: shown below) - # red: 255 - # green: 255 - # blue: 255 - # Optional: Line thickness of font (default: shown below) - # thickness: 2 - # Optional: Effect of lettering (default: shown below) - # None (No effect), - # "solid" (solid background in inverse color of font) - # "shadow" (shadow for font) - effect: solid - - # Required - cameras: - {{- range .Values.frigate.cameras }} - # Required: name of the camera - {{ .name }}: - objects: - # Optional: list of objects to track from labelmap.txt (default: shown below) - track: - {{- range .objects.track }} - - {{ . }} - {{- end }} - detect: - width: {{ .detect.width }} - height: {{ .detect.height }} - # Required: ffmpeg settings for the camera - ffmpeg: - # Required: A list of input streams for the camera. See documentation for more information. - inputs: - {{- range .inputs }} - - path: {{ .path }} - roles: - {{- range .roles }} - - {{ . }} - {{- end }} - {{- end }} - record: - enabled: {{ .record.enabled }} - # Optional: timeout for highest scoring image before allowing it - # to be replaced by a newer image. (default: shown below) - best_image_timeout: 60 - snapshots: - enabled: {{ .snapshots.enabled }} - - # Optional: zones for this camera - # zones: - # Required: name of the zone - # NOTE: This must be different than any camera names, but can match with another zone on another - # camera. - # front_steps: - # Required: List of x,y coordinates to define the polygon of the zone. - # NOTE: Coordinates can be generated at https://www.image-map.net/ - # coordinates: 545,1077,747,939,788,805 - # Optional: List of objects that can trigger this zone (default: all tracked objects) - # objects: - # - person - # Optional: Zone level object filters. - # NOTE: The global and camera filters are applied upstream. - # filters: - # person: - # min_area: 5000 - # max_area: 100000 - # threshold: 0.7 - - # Optional: Configuration for the jpg snapshots published via MQTT - # mqtt: - # Optional: Enable publishing snapshot via mqtt for camera (default: shown below) - # NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'. - # All other messages will still be published. - # enabled: true - # Optional: print a timestamp on the snapshots (default: shown below) - # timestamp: True - # Optional: draw bounding box on the snapshots (default: shown below) - # bounding_box: True - # Optional: crop the snapshot (default: shown below) - # crop: True - # Optional: height to resize the snapshot to (default: shown below) - # height: 270 - # Optional: jpeg encode quality (default: shown below) - # quality: 70 - # Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones) - # required_zones: [] - {{- end }} - podSecurityContext: runAsUser: 0 runAsGroup: 0 -service: - main: - ports: - main: - targetPort: 5000 - port: 5000 - rtmp: +global: + isSCALE: true + +# -- In most cases the "enabled" 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. +# - Do not blindly copy paste configuration from upstream. +frigate: + mqtt: + host: mqtt.server.com + port: 1883 + # -- NOTE: Must be unique if you are running multiple instances + topic_prefix: frigate + # -- NOTE: Must be unique if you are running multiple instances + client_id: frigate + user: mqtt_user + password: password + stats_interval: 60 + + detectors: + # -- Enable it to add the configuration in the config file + render_config: false + config: + [] + # -- Required: Name of the detector + # - name: coral + # # -- Valid values are 'edgetpu' (requires device property below) and 'cpu'. + # type: edgetpu + # # -- Device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api + # device: usb + # # -- This value is only used for CPU types + # num_threads: 3 + + model: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Path to the model + path: /edgetpu_model.tflite + # -- Optional: Path to the labelmap + labelmap_path: /labelmap.txt + # -- Required: Object detection model input width + width: 320 + # -- Required: Object detection model input height + height: 320 + # -- Optional: Label name modifications. + labelmap: + [] + # - model: "2" + # name: vehicle + # - model: 3 + # name: vehicle + + logger: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Default log verbosity (default: shown below) + default: info + # -- Optional: Component specific logger overrides + logs: + - component: frigate.event + verbosity: debug + + birdseye: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Enables birdseye enabled: true - ports: - rtmp: - protocol: TCP + # -- Optional: Width of the output resolution + width: 1280 + # -- Optional: Height of the output resolution + height: 720 + # -- Optional: Encoding quality of the mpeg1 feed + # - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. + quality: 8 + # -- Optional: Mode of the view. Available options are: objects, motion, and continuous + # - objects - cameras are included if they have had a tracked object within the last 30 seconds + # - motion - cameras are included if motion was detected in the last 30 seconds + # - continuous - all cameras are included always + mode: objects + + ffmpeg: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: global ffmpeg args + global_args: -hide_banner -loglevel warning + # -- Optional: global input args + input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 + # -- Optional: global hwaccel args + # - NOTE: See hardware acceleration docs for your specific device + hwaccel_args: "" + # -- Optional: global output args + output_args: + # -- Optional: output args for detect streams + detect: -f rawvideo -pix_fmt yuv420p + # -- Optional: output args for record streams + record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an + # -- Optional: output args for rtmp streams + rtmp: -c copy -f flv + + detect: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Enables detection for the camera. + # - This value can be set via MQTT and will be updated in startup based on retained value + enabled: true + # -- Optional: width of the frame for the input with the detect role + width: 1280 + # -- Optional: height of the frame for the input with the detect role + height: 720 + # -- Optional: desired fps for your camera for the input with the detect role + # - NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera. + fps: 5 + # -- Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate) + max_disappeared: 25 + # -- Optional: Configuration for stationary object tracking + stationary: + # -- Optional: Frequency for confirming stationary objects + # - When set to 0, object detection will not confirm stationary objects until movement is detected. + # - If set to 10, object detection will run to confirm the object still exists on every 10th frame. + interval: 0 + # -- Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s) + threshold: 50 + # -- Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever) + # - This can help with false positives for objects that should only be stationary for a limited amount of time. + # - It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave + # - car at the default. + # - WARNING: Setting these values overrides default behavior and disables stationary object tracking. + # - There are very few situations where you would want it disabled. It is NOT recommended to + # - copy these values from the example config into your config unless you know they are needed. + # max_frames: + # # -- Optional: Default for all object types (default: not set, track forever) + # default: + # # -- Optional: Object specific values + # objects: + # - object: person + # frames: 1000 + + objects: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: list of objects to track from labelmap.txt + track: + - person + # -- 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. + # - NOTE: This mask is COMBINED with the object type specific mask below + mask: 0,0,1000,0,1000,200,0,200 + # - Optional: filters to reduce false positives for specific object types + filters: + [] + # - object: person + # # -- Optional: Minimum width*height of the bounding box for the detected object + # min_area: 5000 + # # -- Optional: Maximum width*height of the bounding box for the detected object + # max_area: 100000 + # # -- Optional: Minimum width/height of the bounding box for the detected object + # min_ratio: 0.5 + # # -- Optional: Maximum width/height of the bounding box for the detected object + # max_ratio: 2.0 + # # -- Optional: Minimum score for the object to initiate tracking + # min_score: 0.5 + # # -- Optional: Minimum decimal percentage for tracked object's computed score to be considered a true positive + # threshold: 0.7 + # # -- 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 + # mask: 0,0,1000,0,1000,200,0,200 + + motion: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. + # - Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive. + # - The value should be between 1 and 255. + threshold: 25 + # -- Optional: Minimum size in pixels in the resized motion image that counts as motion + # - Increasing this value will prevent smaller areas of motion from being detected. Decreasing will + # - make motion detection more sensitive to smaller moving objects. + # - As a rule of thumb: + # - 15 - high sensitivity + # - 30 - medium sensitivity + # - 50 - low sensitivity + contour_area: 30 + # -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames + # - Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion. + # - Too low and a fast moving person wont be detected as motion. + delta_alpha: 0.2 + # -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background + # - Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster. + # - Low values will cause things like moving shadows to be detected as motion for longer. + # - https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/ + frame_alpha: 0.2 + # -- Optional: Height of the resized motion frame (default: 50) + # - This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense + # - of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion. + frame_height: 50 + # -- Optional: motion mask + # - NOTE: see docs for more detailed info on creating masks + mask: 0,900,1080,900,1080,1920,0,1920 + # -- Optional: improve contrast + # - Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive + # - for daytime. + improve_contrast: False + # -- Optional: Delay when updating camera motion through MQTT from ON -> OFF + mqtt_off_delay: 30 + + record: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Enable recording + # - WARNING: If recording is disabled in the config, turning it on via + # - the UI or MQTT later will have no effect. + # - WARNING: Frigate does not currently support limiting recordings based + # - on available disk space automatically. If using recordings, + # - you must specify retention settings for a number of days that + # - will fit within the available disk space of your drive or Frigate will crash. + enabled: False + # -- Optional: Number of minutes to wait between cleanup runs + # - This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o + expire_interval: 60 + # -- Optional: Retention settings for recording + retain: + # -- Render retain config + render_config: false + # -- Optional: Number of days to retain recordings regardless of events + # - NOTE: This should be set to 0 and retention should be defined in events section below + # - if you only want to retain recordings of events. + days: 0 + # -- Optional: Mode for retention. Available options are: all, motion, and active_objects + # - all - save all recording segments regardless of activity + # - motion - save all recordings segments with any detected motion + # - active_objects - save all recording segments with active/moving objects + # - NOTE: this mode only applies when the days setting above is greater than 0 + mode: all + # -- Optional: Event recording settings + events: + # -- Optional: Number of seconds before the event to include + pre_capture: 5 + # -- Optional: Number of seconds after the event to include + post_capture: 5 + # -- Optional: Objects to save recordings for. Defaults to all + objects: + [] + # - person + # -- Optional: Restrict recordings to objects that entered any of the listed zones + required_zones: [] + # -- Optional: Retention settings for recordings of events + retain: + # -- Render retain config + render_config: false + # -- Required: Default retention days + default: 10 + # -- Optional: Mode for retention. + # - all - save all recording segments for events regardless of activity + # - motion - save all recordings segments for events with any detected motion + # - active_objects - save all recording segments for event with active/moving objects + mode: motion + # -- Optional: Per object retention days + objects: + - object: person + days: 15 + + snapshots: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Enable writing jpg snapshot to /media/frigate/clips + # - This value can be set via MQTT and will be updated in startup based on retained value + enabled: false + # -- Optional: Save a clean PNG copy of the snapshot image + clean_copy: true + # -- Optional: print a timestamp on the snapshots + timestamp: false + # -- Optional: draw bounding box on the snapshots + bounding_box: false + # -- Optional: crop the snapshot + crop: false + # -- Optional: height to resize the snapshot to (default: original size) + height: + # -- Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones) + required_zones: [] + # -- Optional: Camera override for retention settings (default: global values) + retain: + # -- Render retain config + render_config: false + # -- Required: Default retention days (default: shown below) + default: 10 + # -- Optional: Per object retention days + objects: + - object: person + days: 15 + + rtmp: + # -- Enable it to add the configuration in the config file + render_config: false + # - Optional: Enable the RTMP stream + enabled: True + + live: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Set the height of the live stream. (default: 720) + # - This must be less than or equal to the height of the detect stream. Lower resolutions + # - reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio. + height: 720 + # -- Optional: Set the encode quality of the live stream (default: shown below) + # - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. + quality: 8 + + timestamp_style: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Position of the timestamp + # - "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right) + position: "tl" + # -- Optional: Format specifier conform to the Python package "datetime" + # - Additional Examples: + # - german: "%d.%m.%Y %H:%M:%S" + format: "%m/%d/%Y %H:%M:%S" + # -- Optional: Color of font + color: + # -- All Required when color is specified (default: shown below) + red: 255 + green: 255 + blue: 255 + # -- Optional: Line thickness of font (default: shown below) + thickness: 2 + # -- Optional: Effect of lettering (default: shown below) + # - None (No effect), + # - "solid" (solid background in inverse color of font) + # - "shadow" (shadow for font) + effect: None + + cameras: + # -- Required: name of the camera + - camera_name: back + # -- Required: ffmpeg settings for the camera + ffmpeg: + # -- Required: A list of input streams for the camera. See documentation for more information. + inputs: + # -- Required: the path to the stream + - path: rtsp://viewer:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2 + # -- Required: list of roles for this stream. valid values are: detect,record,rtmp + # - NOTICE: In addition to assigning the record, and rtmp roles, + # - they must also be enabled in the camera config. + roles: + - detect + - rtmp + # -- Optional: stream specific global args + global_args: + # - Optional: stream specific hwaccel args + hwaccel_args: + # - Optional: stream specific input args + input_args: + # -- Optional: camera specific global args + global_args: + # -- Optional: camera specific hwaccel args + hwaccel_args: + # -- Optional: camera specific input args + input_args: + # -- Optional: camera specific output args + output_args: + # -- Optional: timeout for highest scoring image before allowing it + # - to be replaced by a newer image. + best_image_timeout: 60 + # -- Optional: zones for this camera + zones: + # -- Required: name of the zone + # - NOTE: This must be different than any camera names, but can match with another zone on another camera + - name: front_steps + # -- Required: List of x,y coordinates to define the polygon of the zone. + # - 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 + # -- Optional: List of objects that can trigger this zone (default: all tracked objects) + objects: + - person + # -- Optional: Zone level object filters. + # -NOTE: The global and camera filters are applied upstream. + filters: + - object: person + min_area: 5000 + max_area: 100000 + threshold: 0.7 + # -- Optional: Configuration for the jpg snapshots published via MQTT + mqtt: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Enable publishing snapshot via mqtt for camera + # - NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'. + # - All other messages will still be published. enabled: true - port: 1935 - targetPort: 1935 + # -- Optional: print a timestamp on the snapshots + timestamp: true + # -- Optional: draw bounding box on the snapshots + bounding_box: true + # -- Optional: crop the snapshot + crop: true + # -- Optional: height to resize the snapshot to + height: 270 + # -- Optional: jpeg encode quality + quality: 70 + # -- Optional: Restrict mqtt messages to objects that entered any of the listed zones + required_zones: [] + # -- Optional: Configuration for how camera is handled in the GUI. + ui: + # -- Enable it to add the configuration in the config file + render_config: false + # -- Optional: Adjust sort order of cameras in the UI. Larger numbers come later + # - By default the cameras are sorted alphabetically. + order: 0 + # -- Optional: Whether or not to show the camera in the Frigate UI + dashboard: true ingress: rtmp: autoLink: true -frigate: - mqtt: - host: mosquitto.ix-mosquitto.svc.cluster.local - port: 1883 - authentitcated: false - username: mqtt_user - password: password - birdseye: +service: + main: + ports: + main: + port: 10500 + protocol: HTTP + targetPort: 5000 + rtmp: enabled: true - mode: motion - cameras: - - name: camera1 - objects: - # Optional: list of objects to track from labelmap.txt (default: shown below) - track: - - person - - car - - motorcyle - - cat - - dog - detect: - height: 720 - width: 1280 - inputs: - # Required: the path to the stream - # NOTE: path may include environment variables, which must begin with 'FRIGATE_' and be referenced in {} - - path: rtsp://username:password@highres.url - # Required: list of roles for this stream. valid values are: detect,record,rtmp - # NOTICE: In addition to assigning the record, and rtmp roles, - # they must also be enabled in the camera config. - roles: - - record - - path: rtsp://username:password@lowres.url - roles: - - detect - - rtmp - record: - enabled: True - # Optional: timeout for highest scoring image before allowing it - # to be replaced by a newer image. (default: shown below) - best_image_timeout: 60 - snapshots: + ports: + rtmp: enabled: true + port: 1935 + targetPort: 1935 + persistence: - cache: - enabled: true - mountPath: "/tmp/cache" - type: "emptyDir" - shm: - enabled: true - mountPath: "/dev/shm" - type: "emptyDir" - medium: "Memory" media: enabled: true - mountPath: "/media" + mountPath: /media + size: 256Gi + db: + enabled: true + mountPath: /db + size: 256Gi + type: emptyDir + cache: + enabled: true + mountPath: /tmp/cache + type: emptyDir + shm: + enabled: true + mountPath: /dev/shm + type: emptyDir + medium: Memory frigate-config: enabled: true - mountPath: "/config/config.yml" - subPath: "config.yml" - type: "custom" - volumeSpec: - configMap: - name: '{{ template "tc.common.names.fullname" . }}-config' + mountPath: /config + type: configMap + objectName: '{{ template "tc.common.names.fullname" . }}-frigate-config' + items: + - key: config.yml + path: config.yml portal: enabled: true diff --git a/charts/stable/meshcentral/docs/installation-instructions.md b/charts/stable/meshcentral/docs/installation-instructions.md index 18dc01e64ce..1bd2b38842e 100644 --- a/charts/stable/meshcentral/docs/installation-instructions.md +++ b/charts/stable/meshcentral/docs/installation-instructions.md @@ -8,7 +8,9 @@ Ingress for this chart is **required** In both Native Helm and TrueNAS Scale, keys that start with `_` are **unset**. -## TrueNAS Scale +## Configuration + +### TrueNAS Scale In order to be able to expose some options in the GUI, but also give users the option to users to **unset** those values, @@ -79,6 +81,33 @@ Please use the exact casing as in the [MeshCentral's json schema](https://github ::: -## Native Helm +### Native Helm Native Helm users won't be affected with the above. + +## Hardcoded values + +We hardcoded some values, so the chart/app can work correctly based on how it's written. +Those values are: + +```json +{ + "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json", + "settings": { + "mongoDB": "actual-generated-mongodb-url", + "mongoDbName": "actual-mongodb-name", + "sessionKey": "32char-long-random-generated-key", + "port": "to-the-same-port-as-your-main-service", + "selfUpdate": false, + "cleanNpmCacheOnUpdate": false + }, + "domains": { + // This applies to ALL domains + "": { + "myServer": { + "Upgrade": false + } + } + } +} +```