[double-take] Make detectors and notifiers optional (#1321)

* [double-take] Make detectors and notifiers optional

The default values file includes the `compreface` detector which should
be optional. There is no way to omit it.

Each detector and notifier (gotify) now contains an `enabled` field
which must be set to true to add that detector to the config, otherwise
it will be omitted.

Implements: #1314
This commit is contained in:
Jonathan Bartlett 2021-12-30 11:11:56 +00:00 committed by GitHub
parent 8d94e9ef4a
commit 9070817c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 89 additions and 28 deletions

View File

@ -3,7 +3,7 @@ apiVersion: v2
appVersion: 1.6.0
description: Unified UI and API for processing and training images for facial recognition.
name: double-take
version: 1.1.0
version: 2.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- double-take
@ -16,6 +16,8 @@ sources:
maintainers:
- name: crutonjohn
email: crutonjohn@pm.me
- name: jonnobrow
email: jonathan@jonnobrow.co.uk
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com

View File

@ -1,6 +1,6 @@
# double-take
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![AppVersion: 1.6.0](https://img.shields.io/badge/AppVersion-1.6.0-informational?style=flat-square)
![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: 1.6.0](https://img.shields.io/badge/AppVersion-1.6.0-informational?style=flat-square)
Unified UI and API for processing and training images for facial recognition.
@ -8,7 +8,7 @@ Unified UI and API for processing and training images for facial recognition.
## Source Code
* <https://github.com/jakowenko/double-take>
- <https://github.com/jakowenko/double-take>
## Requirements
@ -17,7 +17,7 @@ Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| -------------------------------------- | ------ | ------- |
| https://library-charts.k8s-at-home.com | common | 4.2.0 |
## TL;DR
@ -74,8 +74,12 @@ helm install double-take k8s-at-home/double-take -f values.yaml
**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common)
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| ----------------------------------- | ------ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config | object | See values.yaml | double-take configuration settings. This will be copied into the container's persistent storage at first run only. Further configuration should be done in the application itself! See [project documentation](https://github.com/jakowenko/double-take#configuration) for more information. |
| config.detectors.compreface.enabled | bool | see values.yaml | enable or disable the compreface detector |
| config.detectors.deepstack.enabled | bool | see values.yaml | enable or disable the compreface detector |
| config.detectors.facebox.enabled | bool | see values.yaml | enable or disable the compreface detector |
| config.notify.gotify.enabled | bool | see values.yaml | enable gotify |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"jakowenko/double-take"` | image repository |
| image.tag | string | `"1.6.0"` | image tag |
@ -89,6 +93,24 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.0]
#### Added
- Ability to enable/disable detectors and notifiers (gotify).
#### Changed
- **Potentially Breaking**: The `enabled` key in detectors and notifiers is
required for the respective configuration to be tangled into the config map.
It is added by default in the values file for new installation.
#### Removed
- N/A
[1.0.0]: #100
### [1.0.0]
#### Added
@ -112,5 +134,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Ask a [question](https://github.com/k8s-at-home/organization/discussions)
- Join our [Discord](https://discord.gg/sTMX7Vh) community
----------------------------------------------
---
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)

View File

@ -9,6 +9,24 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.0]
#### Added
- Ability to enable/disable detectors and notifiers (gotify).
#### Changed
- **Potentially Breaking**: The `enabled` key in detectors and notifiers is
required for the respective configuration to be tangled into the config map.
It is added by default in the values file for new installation.
#### Removed
- N/A
[1.0.0]: #100
### [1.0.0]
#### Added

View File

@ -7,6 +7,16 @@ metadata:
{{- include "common.labels" . | nindent 4 }}
data:
config.yml: |
{{- with .Values.config }}
{{- toYaml . | nindent 4 }}
{{- range $name, $config := .Values.config }}
{{- if or (eq $name "detectors") (eq $name "notify") }}
{{ $name }}:
{{- range $innerName, $innerConfig := $config }}
{{- if $innerConfig.enabled }}
{{- $newInnerConfig := omit $innerConfig "enabled" }}
{{ $innerName }}:{{ toYaml $newInnerConfig | nindent 8 }}
{{- end }}
{{- end }}
{{- else }}
{{ $name }}:{{ toYaml $config | nindent 6 }}
{{- end }}
{{- end }}

View File

@ -194,6 +194,8 @@ config:
# detector settings (default: shown below)
detectors:
compreface:
# -- enable or disable the compreface detector
enabled: true
url:
# recognition api key
key:
@ -206,16 +208,20 @@ config:
# https://github.com/exadel-inc/CompreFace/blob/master/docs/Face-services-and-plugins.md)
# face_plugins: mask,gender,age
# deepstack:
# url:
# key:
# # number of seconds before the request times out and is aborted
# timeout: 15
deepstack:
# -- enable or disable the deepstack detector
enabled: false
url:
key:
# -- number of seconds before the request times out and is aborted
timeout: 15
# facebox:
# url:
# # number of seconds before the request times out and is aborted
# timeout: 15
facebox:
# -- enable or disable the facebox detector
enabled: false
url:
# -- number of seconds before the request times out and is aborted
timeout: 15
# schedule settings (default: shown below)
schedule:
@ -240,6 +246,8 @@ config:
# notify settings (default: shown below)
notify:
gotify:
# -- enable gotify
enabled: true
url:
token:
priority: 5