From c56ed3ff1f78c08ec67d062102f1176f7d1c498d Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 24 Jan 2022 12:07:03 +0200 Subject: [PATCH] feat(deepstack): use configmap to clean up gui (#1771) * feat(deepstack): use configmap to clean up gui * add secrets and vision-enhance for the upcoming version * bump major and update common * rename app to deepstack * try the new configmap tpl * fix configmap * common * envFrom? * maybe? * or this? * Update charts/stable/deepstack/values.yaml * Update charts/stable/deepstack/values.yaml * try escaping Co-authored-by: Kjeld Schouten-Lebbing --- charts/stable/deepstack/Chart.yaml | 2 +- charts/stable/deepstack/questions.yaml | 90 ++++++++++++++++---------- charts/stable/deepstack/values.yaml | 26 +++++++- 3 files changed, 80 insertions(+), 38 deletions(-) diff --git a/charts/stable/deepstack/Chart.yaml b/charts/stable/deepstack/Chart.yaml index 4f2dd765284..ef8db6e6a8b 100644 --- a/charts/stable/deepstack/Chart.yaml +++ b/charts/stable/deepstack/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://hub.docker.com/r/deepquestai/deepstack - https://www.deepstack.cc/ type: application -version: 1.0.7 +version: 2.0.0 annotations: truecharts.org/catagories: | - AI diff --git a/charts/stable/deepstack/questions.yaml b/charts/stable/deepstack/questions.yaml index e1f533314fa..2e9a981f582 100644 --- a/charts/stable/deepstack/questions.yaml +++ b/charts/stable/deepstack/questions.yaml @@ -87,7 +87,29 @@ questions: - value: "OnDelete" description: "(Legacy) OnDelete: ignore .spec.template changes" # Include{controllerExpert} - # Configure Enviroment Variables + - variable: secret + group: "Container Configuration" + label: "Image Secrets" + schema: + additional_attrs: true + type: dict + attrs: + - variable: API-KEY + label: "API Key" + description: "The API Key protects all recognition and detection endpoints including face, scene, object detection and custom models" + schema: + type: string + private: true + default: "" + - variable: ADMIN-KEY + label: "Admin key" + description: "The admin key protects admin apis such as adding models, deleting models, list models, backup and restore." + schema: + type: string + default: "" + private: true + + # Configure Enviroment Variables - variable: env group: "Container Configuration" label: "Image Environment" @@ -102,39 +124,6 @@ questions: schema: type: int default: 568 - - variable: VISION-FACE - label: "VISION-FACE" - description: "Enables Face Detection" - schema: - type: string - default: "False" - enum: - - value: "False" - description: "False" - - value: "True" - description: "True" - - variable: VISION-DETECTION - label: "VISION-DETECTION" - description: "Enables Object Detection" - schema: - type: string - default: "True" - enum: - - value: "False" - description: "False" - - value: "True" - description: "True" - - variable: VISION-SCENE - label: "VISION-SCENE" - description: "Enables Scene Detection" - schema: - type: string - default: "False" - enum: - - value: "False" - description: "False" - - value: "True" - description: "True" - variable: MODE label: "Mode" description: "Sets the performance mode" @@ -148,6 +137,39 @@ questions: description: "Medium" - value: "Low" description: "Low" + - variable: deepstack + group: "Container Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: vision_face + label: "VISION-FACE" + description: "Enables Face Detection" + schema: + type: boolean + default: false + - variable: vision_detection + label: "VISION-DETECTION" + description: "Enables Object Detection" + schema: + type: boolean + default: true + enum: + - variable: vision_scene + label: "VISION-SCENE" + description: "Enables Scene Detection" + schema: + type: boolean + default: false + - variable: vision_face + label: "VISION-ENHANCE" + description: "Enables Enhance Endpoint" + schema: + type: boolean + default: false + # Include{containerConfig} - variable: service diff --git a/charts/stable/deepstack/values.yaml b/charts/stable/deepstack/values.yaml index c4a0b24c446..677f3669c99 100644 --- a/charts/stable/deepstack/values.yaml +++ b/charts/stable/deepstack/values.yaml @@ -25,17 +25,28 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 +secret: + API-KEY: "" + ADMIN-KEY: "" + env: PUID: 568 USER_ID: "{{ .Values.env.PUID }}" - VISION-FACE: "True" - VISION-DETECTION: "True" - VISION-SCENE: "True" # Path to custom models (needs to be on documentation) MODELSTORE-DETECTION: "{{ .Values.persistence.modelstore.mountPath }}" # High|Medium|Low MODE: "High" +envFrom: + - configMapRef: + name: "{{ include \"common.names.fullname\" . }}-deepstack" + +deepstack: + vision_face: true + vision_detection: true + vision_scene: true + vision_enhance: true + persistence: data: enabled: true @@ -43,3 +54,12 @@ persistence: modelstore: enabled: true mountPath: "/modelstore/detection" + +configmap: + deepstack: + enabled: true + data: + VISION-FACE: "{{ ternary \"True\" \"False\" .Values.deepstack.vision_face }}" + VISION-DETECTION: "{{ ternary \"True\" \"False\" .Values.deepstack.vision_detection }}" + VISION-SCENE: "{{ ternary \"True\" \"False\" .Values.deepstack.vision_scene }}" + VISION-ENHANCE: "{{ ternary \"True\" \"False\" .Values.deepstack.vision_enhance }}"