fix(flowise) fix storage paths, update secrets key and add new gui items. (#18934)

**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?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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._
This commit is contained in:
Xstar97TheNoob 2024-03-04 19:42:18 -05:00 committed by GitHub
parent 98de237bd5
commit eb5e53f7e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 61 additions and 19 deletions

View File

@ -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

View File

@ -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}

View File

@ -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 -}}

View File

@ -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