feat(open-webui): Add application logging configuration

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
Mario Trangoni 2025-05-07 11:28:32 +02:00
parent 22b300940a
commit 1c091cbd03
5 changed files with 129 additions and 2 deletions

View File

@ -1,6 +1,6 @@
apiVersion: v2
name: open-webui
version: 6.9.0
version: 6.10.0
appVersion: 0.6.6
home: https://www.openwebui.com/
icon: >-

View File

@ -1,6 +1,6 @@
# open-webui
![Version: 6.9.0](https://img.shields.io/badge/Version-6.9.0-informational?style=flat-square) ![AppVersion: 0.6.6](https://img.shields.io/badge/AppVersion-0.6.6-informational?style=flat-square)
![Version: 6.10.0](https://img.shields.io/badge/Version-6.10.0-informational?style=flat-square) ![AppVersion: 0.6.6](https://img.shields.io/badge/AppVersion-0.6.6-informational?style=flat-square)
Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋
@ -41,6 +41,23 @@ helm upgrade --install open-webui open-webui/open-webui
## Values
### Logging configuration
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| logging.components.audio | string | `""` | Set the log level for the Audio processing component |
| logging.components.comfyui | string | `""` | Set the log level for the ComfyUI Integration component |
| logging.components.config | string | `""` | Set the log level for the Configuration Management component |
| logging.components.db | string | `""` | Set the log level for the Database Operations (Peewee) component |
| logging.components.images | string | `""` | Set the log level for the Image Generation component |
| logging.components.main | string | `""` | Set the log level for the Main Application Execution component |
| logging.components.models | string | `""` | Set the log level for the Model Management component |
| logging.components.ollama | string | `""` | Set the log level for the Ollama Backend Integration component |
| logging.components.openai | string | `""` | Set the log level for the OpenAI API Integration component |
| logging.components.rag | string | `""` | Set the log level for the Retrieval-Augmented Generation (RAG) component |
| logging.components.webhook | string | `""` | Set the log level for the Authentication Webhook component |
| logging.level | string | `""` | Set the global log level ["notset", "debug", "info" (default), "warning", "error", "critical"] |
### Azure Storage configuration
| Key | Type | Default | Description |

View File

@ -180,3 +180,56 @@ Validate SSO ClientSecret to be set literally or via Secret
{{- fail (printf "You must provide either .Values.sso.%s.clientSecret or .Values.sso.%s.clientExistingSecret" $provider $provider) }}
{{- end }}
{{- end }}
{{- /*
Fail template rendering if invalid log component
*/ -}}
{{- define "logging.isValidComponent" -}}
{{- $component := . | lower -}}
{{- $validComponents := dict
"audio" true
"comfyui" true
"config" true
"db" true
"images" true
"main" true
"models" true
"ollama" true
"openai" true
"rag" true
"webhook" true
-}}
{{- hasKey $validComponents $component -}}
{{- end }}
{{- define "logging.assertValidComponent" -}}
{{- $component := lower . -}}
{{- $res := include "logging.isValidComponent" $component }}
{{- if ne $res "true" }}
{{- fail (printf "Invalid logging component name: '%s'. Valid names: audio, comfyui, config, db, images, main, models, ollama, openai, rag, webhook" $component) }}
{{- end }}
{{- end }}
{{- /*
Fail template rendering if invalid log level
*/ -}}
{{- define "logging.assertValidLevel" -}}
{{- $level := lower . }}
{{- $validLevels := dict "notset" true "debug" true "info" true "warning" true "error" true "critical" true }}
{{- if not (hasKey $validLevels $level) }}
{{- fail (printf "Invalid log level: '%s'. Valid values are: notset, debug, info, warning, error, critical" $level) }}
{{- end }}
{{- end }}
{{- /*
Render a logging env var for a component, validating value
*/ -}}
{{- define "logging.componentEnvVar" -}}
{{- $name := .componentName }}
{{- $level := .logLevel }}
{{- include "logging.assertValidComponent" $name -}}
{{- include "logging.assertValidLevel" $level }}
- name: {{ printf "%s_LOG_LEVEL" (upper $name) | quote }}
value: {{ $level | quote | trim }}
{{- end }}

View File

@ -320,6 +320,19 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.logging.level }}
{{- include "logging.assertValidLevel" .Values.logging.level }}
- name: "GLOBAL_LOG_LEVEL"
value: {{ .Values.logging.level | quote }}
{{- end }}
{{- if .Values.logging.components }}
{{- range $name, $level := .Values.logging.components }}
{{- if $level }}
{{- include "logging.componentEnvVar" (dict "componentName" $name "logLevel" $level) | indent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.extraEnvVars }}
{{- toYaml .Values.extraEnvVars | nindent 8 }}
{{- end }}

View File

@ -198,6 +198,7 @@ ingress:
additionalHosts: []
tls: false
existingSecret: ""
persistence:
enabled: true
size: 2Gi
@ -544,3 +545,46 @@ postgresql:
limits:
memory: 512Mi
cpu: 500m
# Configure Application logging levels (see. https://docs.openwebui.com/getting-started/advanced-topics/logging#-logging-levels-explained)
logging:
# -- Set the global log level ["notset", "debug", "info" (default), "warning", "error", "critical"]
# @section -- Logging configuration
level: ""
# Optional granularity: override log levels per subsystem/component
# if not set, it will use the global level (see. https://docs.openwebui.com/getting-started/advanced-topics/logging#%EF%B8%8F-appbackend-specific-logging-levels)
components:
# -- Set the log level for the Audio processing component
# @section -- Logging configuration
audio: ""
# -- Set the log level for the ComfyUI Integration component
# @section -- Logging configuration
comfyui: ""
# -- Set the log level for the Configuration Management component
# @section -- Logging configuration
config: ""
# -- Set the log level for the Database Operations (Peewee) component
# @section -- Logging configuration
db: ""
# -- Set the log level for the Image Generation component
# @section -- Logging configuration
images: ""
# -- Set the log level for the Main Application Execution component
# @section -- Logging configuration
main: ""
# -- Set the log level for the Model Management component
# @section -- Logging configuration
models: ""
# -- Set the log level for the Ollama Backend Integration component
# @section -- Logging configuration
ollama: ""
# -- Set the log level for the OpenAI API Integration component
# @section -- Logging configuration
openai: ""
# -- Set the log level for the Retrieval-Augmented Generation (RAG) component
# @section -- Logging configuration
rag: ""
# -- Set the log level for the Authentication Webhook component
# @section -- Logging configuration
webhook: ""