From eb5e53f7e6794eb3c1d98e581ea192df6969d2f8 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:42:18 -0500 Subject: [PATCH] fix(flowise) fix storage paths, update secrets key and add new gui items. (#18934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** fix storage paths, update secrets key and add new gui items. ⚒️ Fixes #18933 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] 🔃 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 - [ ] ⚠️ 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. - [ ] 🖼️ 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._ --- charts/stable/flowise/Chart.yaml | 2 +- charts/stable/flowise/questions.yaml | 34 ++++++++++++++++++++ charts/stable/flowise/templates/_secrets.tpl | 15 ++++----- charts/stable/flowise/values.yaml | 29 +++++++++++------ 4 files changed, 61 insertions(+), 19 deletions(-) diff --git a/charts/stable/flowise/Chart.yaml b/charts/stable/flowise/Chart.yaml index 9ef93f8f067..7a431dd9c62 100644 --- a/charts/stable/flowise/Chart.yaml +++ b/charts/stable/flowise/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/flowise - https://hub.docker.com/r/flowiseai/flowise type: application -version: 4.3.0 +version: 4.3.1 diff --git a/charts/stable/flowise/questions.yaml b/charts/stable/flowise/questions.yaml index 126c714c012..95b739c2d93 100644 --- a/charts/stable/flowise/questions.yaml +++ b/charts/stable/flowise/questions.yaml @@ -28,6 +28,16 @@ questions: type: string private: true default: "" + - variable: FLOWISE_FILE_SIZE_LIMIT + label: File Size Limit + schema: + type: string + default: "50mb" + - variable: CORS_ORIGINS + label: Cors Origins + schema: + type: string + default: "*" - variable: EXECUTION_MODE label: Execution Mode description: Whether predictions run in their own process or the main process. @@ -62,6 +72,30 @@ questions: description: Verbose - value: debug description: Debug + - variable: LANGCHAIN_TRACING_V2 + label: Enable LangChain Tracing V2 + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: LANGCHAIN_ENDPOINT + label: LangChain Endpoint + schema: + type: string + default: "" + - variable: LANGCHAIN_API_KEY + label: LangChain API Key + schema: + type: string + private: true + default: "" + - variable: LANGCHAIN_PROJECT + label: LangChain Project + schema: + type: string + default: "" + # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} diff --git a/charts/stable/flowise/templates/_secrets.tpl b/charts/stable/flowise/templates/_secrets.tpl index f1fea400703..ac725565fb5 100644 --- a/charts/stable/flowise/templates/_secrets.tpl +++ b/charts/stable/flowise/templates/_secrets.tpl @@ -1,14 +1,13 @@ {{/* Define the secrets */}} {{- define "flowise.secrets" -}} {{- $secretName := (printf "%s-flowise-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} -{{- $flowiseprevious := lookup "v1" "Secret" .Release.Namespace $secretName }} + +{{- $secretKey := randAlphaNum 32 -}} + + {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} + {{- $secretKey = index .data "FLOWISE_SECRETKEY_OVERWRITE" | b64dec -}} + {{- end }} enabled: true data: - {{- if $flowiseprevious }} - PASSPHRASE: {{ index $flowiseprevious.data "PASSPHRASE" | b64dec }} - {{- else }} - {{- $pass_key := randAlphaNum 32 }} - PASSPHRASE: {{ $pass_key }} - {{- end }} - + FLOWISE_SECRETKEY_OVERWRITE: {{ $secretKey }} {{- end -}} diff --git a/charts/stable/flowise/values.yaml b/charts/stable/flowise/values.yaml index bd38e437a06..30ccaa49894 100644 --- a/charts/stable/flowise/values.yaml +++ b/charts/stable/flowise/values.yaml @@ -19,15 +19,7 @@ workload: podSpec: containers: main: - probes: - liveness: - path: "/" - readiness: - path: "/" - startup: - path: "/" args: - - npx - flowise - start env: @@ -35,6 +27,8 @@ workload: # Set paths APIKEY_PATH: "{{.Values.persistence.api.mountPath }}" LOG_PATH: "{{.Values.persistence.logs.mountPath }}" + SECRETKEY_PATH: "{{.Values.persistence.secrets.mountPath }}" + BLOB_STORAGE_PATH: "{{.Values.persistence.storage.mountPath }}" # Postgres DB DATABASE_TYPE: postgres OVERRIDE_DATABASE: true @@ -49,6 +43,7 @@ workload: name: cnpg-main-user key: password DATABASE_NAME: "{{ .Values.cnpg.main.database }}" + DATABASE_SSL: false # child | main EXECUTION_MODE: main # error | warn | info | verbose | debug @@ -57,12 +52,20 @@ workload: # optional auth FLOWISE_USERNAME: user FLOWISE_PASSWORD: 1234 - PASSPHRASE: + FLOWISE_FILE_SIZE_LIMIT: 50mb + CORS_ORIGINS: "*" + # IFRAME_ORIGINS="*" + FLOWISE_SECRETKEY_OVERWRITE: secretKeyRef: name: flowise-secrets - key: PASSPHRASE + key: FLOWISE_SECRETKEY_OVERWRITE # TOOL_FUNCTION_BUILTIN_DEP # TOOL_FUNCTION_EXTERNAL_DEP + LANGCHAIN_TRACING_V2: false + # LANGCHAIN_ENDPOINT=https://api.smith.langchain.com + # LANGCHAIN_API_KEY=your_api_key + # LANGCHAIN_PROJECT=your_project + persistence: api: enabled: true @@ -70,6 +73,12 @@ persistence: logs: enabled: true mountPath: "/config/logs" + secrets: + enabled: true + mountPath: "/config/secrets" + storage: + enabled: true + mountPath: "/config/storage" cnpg: main: enabled: true