From e1750c2353df345f7928ed5240ade9e416fddc03 Mon Sep 17 00:00:00 2001 From: Alec Fenichel Date: Sun, 4 Jun 2023 13:50:18 -0400 Subject: [PATCH] fix(frigate) remove redundant mounts (#9355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # The mounts are already defined in [common](https://github.com/truecharts/library-charts/blob/main/library/common/values.yaml#L205-L215) and cause a conflict. Updated to v0.12 so that mqtt is optional. Disabled ffmpeg config render by default. Enabled installs during CI now that mqtt is optional and ffmpeg config render is disabled. **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 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?** **📃 Notes:** **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 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 - [x] ⚠️ 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. - [x] 🪞 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> --- .github/ct-install.yaml | 2 - charts/incubator/frigate/Chart.yaml | 4 +- charts/incubator/frigate/questions.yaml | 101 +++++++++++------- .../frigate/templates/_configmap.tpl | 4 + charts/incubator/frigate/values.yaml | 22 ++-- 5 files changed, 74 insertions(+), 59 deletions(-) diff --git a/.github/ct-install.yaml b/.github/ct-install.yaml index 28a24826213..3c8cde99436 100644 --- a/.github/ct-install.yaml +++ b/.github/ct-install.yaml @@ -11,7 +11,6 @@ chart-dirs: - charts/operators excluded-charts: - charts/dependency/subchart - - charts/incubator/frigate - charts/incubator/orbital-sync - charts/incubator/plex-meta-manager - charts/library/common @@ -23,7 +22,6 @@ excluded-charts: - charts/stable/facebox - charts/stable/foundryvtt - charts/stable/foundryvtt - - charts/stable/frigate - charts/stable/heimdall - charts/stable/multus - charts/stable/orbital-sync diff --git a/charts/incubator/frigate/Chart.yaml b/charts/incubator/frigate/Chart.yaml index 4b2443c2558..7f5654dc226 100644 --- a/charts/incubator/frigate/Chart.yaml +++ b/charts/incubator/frigate/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "0.11.1" +appVersion: "0.12.0" dependencies: - name: common repository: https://library-charts.truecharts.org @@ -23,7 +23,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/frigate - https://github.com/blakeblackshear/frigate type: application -version: 7.0.1 +version: 8.0.0 annotations: truecharts.org/catagories: | - nvr diff --git a/charts/incubator/frigate/questions.yaml b/charts/incubator/frigate/questions.yaml index 547fd81ff82..3f224964356 100644 --- a/charts/incubator/frigate/questions.yaml +++ b/charts/incubator/frigate/questions.yaml @@ -26,47 +26,68 @@ questions: additional_attrs: true type: dict attrs: - - variable: host - label: Host + - variable: render_config + label: Render Configuration + description: Enable it to add the configuration in the config file schema: - type: string - required: true - default: "" - - variable: port - label: Port - schema: - type: int - default: 1883 - - variable: topic_prefix - label: Topic Prefix - description: Must be unique if you are running multiple instances - schema: - type: string - default: "" - - variable: client_id - label: Client ID - description: Must be unique if you are running multiple instances - schema: - type: string - default: "" - - variable: stats_interval - label: Stats Interval - description: Interval in seconds for publishing stats - schema: - type: int - "null": true - default: 60 - - variable: user - label: Username - schema: - type: string - default: "" - - variable: password - label: Password - schema: - type: string - private: true - default: "" + type: boolean + default: true + show_subquestions_if: true + subquestions: + - variable: enabled + label: Enabled + schema: + type: boolean + show_if: [["enabled", "=", true]] + default: true + - variable: host + label: Host + schema: + type: string + show_if: [["enabled", "=", true]] + required: true + default: "" + - variable: port + label: Port + schema: + type: int + show_if: [["enabled", "=", true]] + default: 1883 + - variable: topic_prefix + label: Topic Prefix + description: Must be unique if you are running multiple instances + schema: + type: string + show_if: [["enabled", "=", true]] + default: "" + - variable: client_id + label: Client ID + description: Must be unique if you are running multiple instances + schema: + type: string + show_if: [["enabled", "=", true]] + default: "" + - variable: stats_interval + label: Stats Interval + description: Interval in seconds for publishing stats + schema: + type: int + show_if: [["enabled", "=", true]] + "null": true + default: 60 + - variable: user + label: Username + schema: + type: string + show_if: [["enabled", "=", true]] + default: "" + - variable: password + label: Password + schema: + type: string + show_if: [["enabled", "=", true]] + private: true + default: "" - variable: detectors label: Detectors schema: diff --git a/charts/incubator/frigate/templates/_configmap.tpl b/charts/incubator/frigate/templates/_configmap.tpl index 51b56bb2d4b..d2e871638fd 100644 --- a/charts/incubator/frigate/templates/_configmap.tpl +++ b/charts/incubator/frigate/templates/_configmap.tpl @@ -5,6 +5,7 @@ data: config.yml: | database: path: /db/frigate.db + mqtt: {{- include "frigate.mqtt" .Values.frigate.mqtt | indent 6 }} @@ -470,6 +471,8 @@ logs: {{- define "frigate.mqtt" -}} {{- $mqtt := . }} +{{- if $mqtt.render_config }} +enabled: {{ ternary "True" "False" $mqtt.enabled }} host: {{ required "You need to provide an MQTT host" $mqtt.host }} {{- with $mqtt.port }} port: {{ . }} @@ -490,3 +493,4 @@ user: {{ . }} password: {{ . }} {{- end -}} {{- end -}} +{{- end -}} diff --git a/charts/incubator/frigate/values.yaml b/charts/incubator/frigate/values.yaml index 8a2b77f3507..34f2a107db2 100644 --- a/charts/incubator/frigate/values.yaml +++ b/charts/incubator/frigate/values.yaml @@ -1,14 +1,14 @@ image: repository: tccr.io/truecharts/frigate pullPolicy: IfNotPresent - tag: 0.11.1@sha256:8dd7273eebf396563d7bbc14778fd3d58c624e5063ffcf74b5b0afe63e7cdd7f + tag: v0.12.0@sha256:6fac983662fc6095ffdc8dd494f0c918192ddab80602f01d50a3569dab868148 securityContext: container: readOnlyRootFilesystem: false runAsNonRoot: false runAsUser: 0 - runAsGroup: 0 + runAsGroup: 0 # -- 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. # - Do not blindly copy paste configuration from upstream. As this won't work on all cases @@ -16,6 +16,10 @@ securityContext: # - Those "nulls" should be replaced with integers (if you want to set a value) frigate: mqtt: + # -- Enable it to add the configuration in the config file + render_config: true + # -- Enables MQTT + enabled: false host: mqtt.server.com port: 1883 # -- NOTE: Must be unique if you are running multiple instances @@ -87,7 +91,7 @@ frigate: ffmpeg: # -- Enable it to add the configuration in the config file - render_config: true + render_config: false # -- Optional: global ffmpeg args global_args: "" # -- Optional: global input args @@ -450,21 +454,9 @@ persistence: media: enabled: true 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