[frigate] Allow mask files to be passed to the container, version bump (#312)

* Update Frigate version

* Allow configmap that contains camera masks

* Enable startupProbe functionality

* Disable probes by default

* Disable probes only during CI

* Disable probes only during CI
This commit is contained in:
BJWS 2020-08-06 14:41:34 +02:00 committed by GitHub
parent bf08c9dc7d
commit bd9f296d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 4 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v1
appVersion: "0.5.1"
appVersion: "0.5.2"
description: Realtime object detection on RTSP cameras with the Google Coral
name: frigate
version: 3.1.0
version: 3.2.0
keywords:
- tensorflow
- coral

View File

@ -49,7 +49,7 @@ The command removes all the Kubernetes components associated with the chart and
## Configuration
The following tables lists the configurable parameters of the Sentry chart and their default values.
The following tables lists the configurable parameters of the Frigate chart and their default values.
| Parameter | Description | Default |
|----------------------------|-------------------------------------|---------------------------------------------------------|
@ -62,6 +62,7 @@ The following tables lists the configurable parameters of the Sentry chart and t
| `extraSecretForEnvFrom` | Secrets containing env variables for | `[]` |
| `coral.enabled` | Use the Coral USB device | `false` |
| `coral.hostPath` | Host Path to reference USB device location (on the host) | `/dev/bus/usb` |
| `masksConfigMap` | Reference to existing ConfigMap that contains camera masks - [more info](https://github.com/blakeblackshear/frigate#masks-and-limiting-detection-to-a-certain-area) | `{}` |
| `shmSize` | Shared memory size for processing | `1Gi` |
| `config` | frigate configuration - see [config.yaml](https://github.com/blakeblackshear/frigate/blob/master/config/config.yml) for example | `{}` |
| `Service.type` | Kubernetes service type for the frigate GUI | `ClusterIP` |

View File

@ -0,0 +1,8 @@
# Probes configuration
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false

View File

@ -29,6 +29,27 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: config
securityContext:
readOnlyRootFilesystem: true
image: "{{ .Values.initContainer.image.repository }}:{{ .Values.initContainer.image.tag }}"
imagePullPolicy: {{ .Values.initContainer.image.pullPolicy }}
volumeMounts:
- mountPath: /frigate-config
name: configmap
- mountPath: /masks
name: masks
- mountPath: /config
name: config
readOnly: false
command: ['sh', '-c']
args:
- cp /frigate-config/* /config;
{{- if .Values.masksConfigMap }}
cp /masks/* /config;
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@ -59,6 +80,15 @@ spec:
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end }}
{{- if .Values.probes.startup.enabled }}
startupProbe:
httpGet:
path: /
port: http
scheme: HTTP
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
{{- end }}
env:
{{- if .Values.timezone }}
- name: TZ
@ -84,8 +114,18 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: config
emptyDir: {}
- name: configmap
configMap:
name: {{ template "frigate.fullname" . }}
- name: masks
{{- if .Values.masksConfigMap }}
configMap:
name: {{ .Values.masksConfigMap }}
{{- else }}
emptyDir:
{}
{{- end }}
{{- if .Values.coral.enabled }}
- name: usb
hostPath:

View File

@ -9,7 +9,7 @@ strategyType: Recreate
image:
repository: blakeblackshear/frigate
tag: 0.5.1
tag: 0.5.2
pullPolicy: IfNotPresent
rtspPassword: password
@ -21,6 +21,18 @@ coral:
enabled: false
hostPath: /dev/bus/usb
# Specify image that generates the config folder containing the Frigate config file, masks (if specified), etc.
initContainer:
image:
repository: busybox
tag: latest
pullPolicy: Always
# reference to configMap that contains the binary data of the masks to be copied into the container
# this requires that generateConfigFolder.enabled = true
# see https://github.com/blakeblackshear/frigate#masks-and-limiting-detection-to-a-certain-area for more info
masksConfigMap: {}
shmSize: 1Gi
imagePullSecrets: []
@ -179,6 +191,10 @@ probes:
initialDelaySeconds: 30
failureThreshold: 5
timeoutSeconds: 10
startup:
enabled: false
failureThreshold: 30
periodSeconds: 10
service:
type: ClusterIP