Skip to content

Commit 7018cf8

Browse files
authored
Merge branch 'blakeblackshear:master' into webrtc-ports
2 parents 67bd498 + 1ddc8ae commit 7018cf8

File tree

4 files changed

+49
-5
lines changed

4 files changed

+49
-5
lines changed

charts/frigate/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
2-
appVersion: "0.14.0"
2+
appVersion: "0.14.1"
33
description: NVR With Realtime Object Detection for IP Cameras
44
name: frigate
5-
version: 7.6.0
5+
version: 7.7.0
66
keywords:
77
- tensorflow
88
- coral

charts/frigate/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ config: |
4242
- detect
4343
```
4444
45+
#### Configuration Updates
46+
47+
Since the config key is stored in a configMap which is mounted as a read-only file, the Frigate UI
48+
will be unable to update the configuration, and config migration will fail.
49+
50+
If `persistence.config.ephemeralWritableConfigYaml` is set to true along with `persistence.config.enabled`,
51+
the config.yml will be copied into the /config volume mount rather than mounted into it.
52+
53+
Copying the config file means migrations can run, and updates to settings, zones, etc.. will be
54+
written to the running configuration. **However** as soon as the pod is restarted, the changes
55+
will be lost, so you will have to retrieve the config.yml either from the pod, or
56+
by performing a `GET /api/config` and updating your helm values `config` key with the new yaml.
57+
4558
#### Install Chart
4659

4760
Now install the chart:
@@ -93,6 +106,7 @@ helm upgrade --install \
93106
| persistence.config.size | string | `"10Gi"` | size/capacity of the PVC |
94107
| persistence.config.skipuninstall | bool | `false` | Do not delete the pvc upon helm uninstall |
95108
| persistence.config.accessMode | string | `"ReadWriteOnce"` | [access mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) to use for the PVC |
109+
| persistence.config.ephemeralWritableConfigYaml | bool | `true` | Copy config into volume mount for writable ephemeral config support |
96110
| persistence.media.enabled | bool | `false` | Enables persistence for the data directory |
97111
| persistence.media.size | string | `"10Gi"` | size/capacity of the PVC |
98112
| persistence.media.skipuninstall | bool | `false` | Do not delete the pvc upon helm uninstall |
@@ -118,4 +132,4 @@ helm upgrade --install \
118132
| service.type | string | `"ClusterIP"` | Type of Service to use |
119133
| shmSize | string | `"1Gi"` | amount of shared memory to use for caching |
120134
| strategyType | string | `"Recreate"` | upgrade strategy type (e.g. Recreate or RollingUpdate) |
121-
| tolerations | list | `[]` | Node toleration configuration |
135+
| tolerations | list | `[]` | Node toleration configuration |

charts/frigate/templates/deployment.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ spec:
3232
{{- with .Values.imagePullSecrets }}
3333
imagePullSecrets:
3434
{{- toYaml . | nindent 8 }}
35+
{{- end }}
36+
{{- if or .Values.extraInitContainers (and .Values.persistence.config.enabled .Values.persistence.config.ephemeralWritableConfigYaml) }}
37+
initContainers:
38+
{{- with .Values.extraInitContainers }}
39+
{{ toYaml . | nindent 8 }}
40+
{{- end }}
41+
{{- if and .Values.persistence.config.enabled .Values.persistence.config.ephemeralWritableConfigYaml }}
42+
- name: copyconfig
43+
image: "{{ .Values.image.repository }}:{{ include "frigate.imageTag" . }}"
44+
imagePullPolicy: {{ .Values.image.pullPolicy }}
45+
volumeMounts:
46+
- mountPath: /config.yml
47+
subPath: config.yml
48+
name: configmap
49+
- mountPath: /config
50+
name: config
51+
command: [ "cp" ]
52+
args: [ "-v", "/config.yml", "/config/config.yaml" ]
53+
{{- end }}
3554
{{- end }}
3655
containers:
3756
- name: {{ .Chart.Name }}
@@ -47,7 +66,7 @@ spec:
4766
- name: http
4867
containerPort: 5000
4968
protocol: TCP
50-
- name: http-auth
69+
- name: http-auth
5170
containerPort: 8971
5271
protocol: TCP
5372
- name: rtmp
@@ -112,9 +131,11 @@ spec:
112131
- mountPath: {{ .Values.coral.hostPath }}
113132
name: coral-dev
114133
{{- end }}
134+
{{- if not (and .Values.persistence.config.enabled .Values.persistence.config.ephemeralWritableConfigYaml) }}
115135
- mountPath: /config/config.yml
116136
subPath: config.yml
117137
name: configmap
138+
{{- end }}
118139
- mountPath: /config
119140
name: config
120141
- mountPath: /data

charts/frigate/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ingress:
162162
# nginx.org/websocket-services: "<release_name>-frigate" # TODO: can this be automated?
163163

164164
# -- list of hosts and their paths and ports that ingress controller should repsond to.
165-
# -- alternatively use `http` if anonymous auth is allowed
165+
# -- alternatively use `http` if anonymous auth is allowed
166166
hosts:
167167
- host: chart.example.local
168168
paths:
@@ -209,6 +209,12 @@ persistence:
209209
# -- Do not delete the pvc upon helm uninstall
210210
skipuninstall: false
211211

212+
## Copy configMap config into volume to make writable
213+
## All live changes are lost when pod restarts, but this allows
214+
## an easy way to run migrations and edit config, then scrape
215+
## it from the API or copy out of the pod and update local helm values
216+
ephemeralWritableConfigYaml: true
217+
212218
media:
213219
# -- Enables persistence for the media directory
214220
enabled: false
@@ -267,3 +273,6 @@ affinity: {}
267273

268274
# -- Set additonal pod Annotations
269275
podAnnotations: {}
276+
277+
# -- Define extra init containers
278+
extraInitContainers: []

0 commit comments

Comments
 (0)