diff --git a/charts/open-webui/Chart.yaml b/charts/open-webui/Chart.yaml index 078b572..f8cdf5e 100644 --- a/charts/open-webui/Chart.yaml +++ b/charts/open-webui/Chart.yaml @@ -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: >- diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index 2a0019e..e8b762c 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -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 | diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 8787210..af03719 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -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 }} diff --git a/charts/open-webui/templates/workload-manager.yaml b/charts/open-webui/templates/workload-manager.yaml index 4da3df2..70fc331 100644 --- a/charts/open-webui/templates/workload-manager.yaml +++ b/charts/open-webui/templates/workload-manager.yaml @@ -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 }} diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 80d6422..22f1765 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -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: ""