[PR #304] [MERGED] Feat/improve chart #323

Closed
opened 2026-02-15 19:17:22 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/helm-charts/pull/304
Author: @this-is-tobi
Created: 10/8/2025
Status: Merged
Merged: 10/14/2025
Merged by: @westbrook-ai

Base: mainHead: feat/improve-chart


📝 Commits (2)

  • e97aa1b feat(open-webui): handle extraEnvVars definition as map
  • 2056761 docs(open-webui): improve values helper descriptions

📊 Changes

5 files changed (+340 additions, -154 deletions)

View changed files

📝 charts/open-webui/Chart.yaml (+1 -1)
📝 charts/open-webui/README.md (+135 -80)
📝 charts/open-webui/templates/_helpers.tpl (+20 -11)
📝 charts/open-webui/templates/workload-manager.yaml (+10 -9)
📝 charts/open-webui/values.yaml (+174 -53)

📄 Description

Description

This pull request updates the Open WebUI Helm chart to version 8.11.0 and introduces improvements to how OpenAI API keys and environment variables are managed. The changes make it easier and more flexible to configure API keys, especially for multi-endpoint setups, and improve the handling of environment variables by supporting both list and map formats.

Key changes include:

OpenAI API Key Management:

  • Added new openaiApiKey and openaiApiKeys fields in values.yaml for easier and clearer management of OpenAI API keys, supporting both single and multiple endpoints. The Helm template now correctly injects these values as environment variables (OPENAI_API_KEY, OPENAI_API_KEYS) depending on configuration. [1] [2] [3] [4]

Environment Variable Handling:

  • Refactored extraEnvVars to default to an empty list and improved documentation to clarify usage. The Helm templates now support both list and map formats for environment variables, with a new helper (open-webui.env) to convert maps to the correct Kubernetes format. [1] [2] [3] [4] [5]

Tip

When you update a list in Helm, for example by applying multiple value files, the entire list is replaced each time. This is not the case with a map, which is more convenient in certain situations.

Automatic WEBUI_URL Handling:

  • Improved logic for setting the WEBUI_URL environment variable: it will only be set automatically if not already provided, and works with both list and map styles for extraEnvVars.

Documentation and Versioning:

  • Updated chart version to 8.11.0 and revised documentation in README.md to reflect the new configuration options and defaults. [1] [2] [3] [4]
  • Add missing documentation in values.yaml and split into more logical section.

These changes make the chart more flexible and production-ready, especially for users managing multiple OpenAI endpoints or using secrets for environment variable injection.

Tests

OpenAI API Key Management

Values:

# values-openai-key.yaml

openaiBaseApiUrl: "https://api.openai.com/v1"
openaiApiKeys:
- "0p3n-w3bu!"
- "sk-124781258123"

Command:

helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-key.yaml

Result:

# Source: open-webui/templates/workload-manager.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: open-webui
spec:
  template:
    spec:
      containers:
      - name: open-webui
        env:
        - name: "OLLAMA_BASE_URLS"
          value: "http://open-webui-ollama.owui.svc.cluster.local:11434"
        # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values
        - name: "OPENAI_API_BASE_URLS"
          value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1"
        - name: "OPENAI_API_KEYS"
          value: "0p3n-w3bu!;sk-124781258123"

Values:

# values-openai-keys.yaml

openaiBaseApiUrls:
- "https://api.openai.com/v1"
- "https://api.company.openai.com/v1"
openaiApiKeys:
- "0p3n-w3bu!"
- "sk-124781258123"
- "sk-438975983475"

Command:

helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-keys.yaml

Result:

# Source: open-webui/templates/workload-manager.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: open-webui
spec:
  template:
    spec:
      containers:
      - name: open-webui
        env:
        - name: "OLLAMA_BASE_URLS"
          value: "http://open-webui-ollama.owui.svc.cluster.local:11434"
        # If OpenAI API value(s) set and Pipelines is enabled, use OPENAI_API_BASE_URLS to support all the endpoints in the chart
        - name: "OPENAI_API_BASE_URLS"
          value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1;https://api.company.openai.com/v1"
        - name: "OPENAI_API_KEYS"
          value: "0p3n-w3bu!;sk-124781258123;sk-438975983475"

Values:

# values-openai-key-without-pipelines.yaml

pipelines:
  enabled: false
openaiBaseApiUrl: "https://api.openai.com/v1"
openaiApiKey: "sk-124781258123"

Command:

helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-key-without-pipelines.yaml

Result:

# Source: open-webui/templates/workload-manager.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: open-webui
spec:
  template:
    spec:
      containers:
      - name: open-webui
        env:
        - name: "OLLAMA_BASE_URLS"
          value: "http://open-webui-ollama.owui.svc.cluster.local:11434"
        # If only an OpenAI API value is set, set it to OPENAI_API_BASE_URL
        - name: "OPENAI_API_BASE_URL"
          value: "https://api.openai.com/v1"
        - name: "OPENAI_API_KEY"
          value: "sk-124781258123"

Environment Variable Handling

Values:

# values-env-list.yaml

extraEnvVars:
- name: QDRANT_URI
  value: http://qdrant:6333
- name: QDRANT_API_KEY
  valueFrom:
    secretKeyRef:
      name: qdrant-api-key
      key: api-key

Command:

helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-env-list.yaml

Result:

# Source: open-webui/templates/workload-manager.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: open-webui
spec:
  template:
    spec:
      containers:
      - name: open-webui
        env:
        - name: "OLLAMA_BASE_URLS"
          value: "http://open-webui-ollama.owui.svc.cluster.local:11434"
        # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values
        - name: "OPENAI_API_BASE_URLS"
          value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1"
        - name: "OPENAI_API_KEYS"
          value: "0p3n-w3bu!"
        - name: QDRANT_URI
          value: http://qdrant:6333
        - name: QDRANT_API_KEY
          valueFrom:
            secretKeyRef:
              key: api-key
              name: qdrant-api-key

Values:

# values-env-map.yaml

extraEnvVars:
  QDRANT_URI: http://qdrant:6333
  QDRANT_API_KEY:
    valueFrom:
      secretKeyRef:
        name: qdrant-api-key
        key: api-key

Command:

helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-env-map.yaml

Result:

# Source: open-webui/templates/workload-manager.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: open-webui
spec:
  template:
    spec:
      containers:
      - name: open-webui
        env:
        - name: "OLLAMA_BASE_URLS"
          value: "http://open-webui-ollama.owui.svc.cluster.local:11434"
        # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values
        - name: "OPENAI_API_BASE_URLS"
          value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1"
        - name: "OPENAI_API_KEYS"
          value: "0p3n-w3bu!"
        
        - name: QDRANT_API_KEY
          valueFrom:
            secretKeyRef:
              key: api-key
              name: qdrant-api-key
        - name: QDRANT_URI
          value: "http://qdrant:6333"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/helm-charts/pull/304 **Author:** [@this-is-tobi](https://github.com/this-is-tobi) **Created:** 10/8/2025 **Status:** ✅ Merged **Merged:** 10/14/2025 **Merged by:** [@westbrook-ai](https://github.com/westbrook-ai) **Base:** `main` ← **Head:** `feat/improve-chart` --- ### 📝 Commits (2) - [`e97aa1b`](https://github.com/open-webui/helm-charts/commit/e97aa1b3e9aded7ce5675b5c70f5b6924994900a) feat(open-webui): handle extraEnvVars definition as map - [`2056761`](https://github.com/open-webui/helm-charts/commit/20567615f031d479c06da01c4ad5f51ec23a4b92) docs(open-webui): improve values helper descriptions ### 📊 Changes **5 files changed** (+340 additions, -154 deletions) <details> <summary>View changed files</summary> 📝 `charts/open-webui/Chart.yaml` (+1 -1) 📝 `charts/open-webui/README.md` (+135 -80) 📝 `charts/open-webui/templates/_helpers.tpl` (+20 -11) 📝 `charts/open-webui/templates/workload-manager.yaml` (+10 -9) 📝 `charts/open-webui/values.yaml` (+174 -53) </details> ### 📄 Description ## Description This pull request updates the Open WebUI Helm chart to version 8.11.0 and introduces improvements to how OpenAI API keys and environment variables are managed. The changes make it easier and more flexible to configure API keys, especially for multi-endpoint setups, and improve the handling of environment variables by supporting both list and map formats. Key changes include: **OpenAI API Key Management:** * Added new `openaiApiKey` and `openaiApiKeys` fields in `values.yaml` for easier and clearer management of OpenAI API keys, supporting both single and multiple endpoints. The Helm template now correctly injects these values as environment variables (`OPENAI_API_KEY`, `OPENAI_API_KEYS`) depending on configuration. [[1]](diffhunk://#diff-bbcc9d78d9f50476a0b1619e8a1e9a2377f05aeae7aed666433186247f00f30dR334-R348) [[2]](diffhunk://#diff-bbcc9d78d9f50476a0b1619e8a1e9a2377f05aeae7aed666433186247f00f30dR360-R371) [[3]](diffhunk://#diff-105fd9176f116a9143ec3870cadd8a3e9b2407af00d6c214a0d4259833dc31d7R158-R177) [[4]](diffhunk://#diff-f923dfcf40b056769f08b1c67dd4b43fde108d4ddbea3c27e725070d28e9003dR206-R207) **Environment Variable Handling:** * Refactored `extraEnvVars` to default to an empty list and improved documentation to clarify usage. The Helm templates now support both list and map formats for environment variables, with a new helper (`open-webui.env`) to convert maps to the correct Kubernetes format. [[1]](diffhunk://#diff-bbcc9d78d9f50476a0b1619e8a1e9a2377f05aeae7aed666433186247f00f30dR334-R348) [[2]](diffhunk://#diff-bbcc9d78d9f50476a0b1619e8a1e9a2377f05aeae7aed666433186247f00f30dR360-R371) [[3]](diffhunk://#diff-30b266d1118433d0bdc6920f21293cd7eebbec14be663c84f0523ea55b8a6d56L249-L262) [[4]](diffhunk://#diff-105fd9176f116a9143ec3870cadd8a3e9b2407af00d6c214a0d4259833dc31d7L374-R375) [[5]](diffhunk://#diff-f923dfcf40b056769f08b1c67dd4b43fde108d4ddbea3c27e725070d28e9003dL180-R180) > [!TIP] > When you update a list in Helm, for example by applying multiple value files, the entire list is replaced each time. This is not the case with a map, which is more convenient in certain situations. **Automatic WEBUI_URL Handling:** * Improved logic for setting the `WEBUI_URL` environment variable: it will only be set automatically if not already provided, and works with both list and map styles for `extraEnvVars`. **Documentation and Versioning:** * Updated chart version to 8.11.0 and revised documentation in `README.md` to reflect the new configuration options and defaults. [[1]](diffhunk://#diff-fd1c91305ae5ec8685061c0996edf27e8fdf180534d5c02219ed03418765f624L3-R3) [[2]](diffhunk://#diff-f923dfcf40b056769f08b1c67dd4b43fde108d4ddbea3c27e725070d28e9003dL3-R3) [[3]](diffhunk://#diff-f923dfcf40b056769f08b1c67dd4b43fde108d4ddbea3c27e725070d28e9003dL180-R180) [[4]](diffhunk://#diff-f923dfcf40b056769f08b1c67dd4b43fde108d4ddbea3c27e725070d28e9003dR206-R207) * Add missing documentation in `values.yaml` and split into more logical section. These changes make the chart more flexible and production-ready, especially for users managing multiple OpenAI endpoints or using secrets for environment variable injection. ## Tests ### OpenAI API Key Management **Values:** ```yaml # values-openai-key.yaml openaiBaseApiUrl: "https://api.openai.com/v1" openaiApiKeys: - "0p3n-w3bu!" - "sk-124781258123" ``` **Command:** ```sh helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-key.yaml ``` **Result:** ```yaml # Source: open-webui/templates/workload-manager.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: open-webui spec: template: spec: containers: - name: open-webui env: - name: "OLLAMA_BASE_URLS" value: "http://open-webui-ollama.owui.svc.cluster.local:11434" # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values - name: "OPENAI_API_BASE_URLS" value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1" - name: "OPENAI_API_KEYS" value: "0p3n-w3bu!;sk-124781258123" ``` --- **Values:** ```yaml # values-openai-keys.yaml openaiBaseApiUrls: - "https://api.openai.com/v1" - "https://api.company.openai.com/v1" openaiApiKeys: - "0p3n-w3bu!" - "sk-124781258123" - "sk-438975983475" ``` **Command:** ```sh helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-keys.yaml ``` **Result:** ```yaml # Source: open-webui/templates/workload-manager.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: open-webui spec: template: spec: containers: - name: open-webui env: - name: "OLLAMA_BASE_URLS" value: "http://open-webui-ollama.owui.svc.cluster.local:11434" # If OpenAI API value(s) set and Pipelines is enabled, use OPENAI_API_BASE_URLS to support all the endpoints in the chart - name: "OPENAI_API_BASE_URLS" value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1;https://api.company.openai.com/v1" - name: "OPENAI_API_KEYS" value: "0p3n-w3bu!;sk-124781258123;sk-438975983475" ``` --- **Values:** ```yaml # values-openai-key-without-pipelines.yaml pipelines: enabled: false openaiBaseApiUrl: "https://api.openai.com/v1" openaiApiKey: "sk-124781258123" ``` **Command:** ```sh helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-openai-key-without-pipelines.yaml ``` **Result:** ```yaml # Source: open-webui/templates/workload-manager.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: open-webui spec: template: spec: containers: - name: open-webui env: - name: "OLLAMA_BASE_URLS" value: "http://open-webui-ollama.owui.svc.cluster.local:11434" # If only an OpenAI API value is set, set it to OPENAI_API_BASE_URL - name: "OPENAI_API_BASE_URL" value: "https://api.openai.com/v1" - name: "OPENAI_API_KEY" value: "sk-124781258123" ``` ### Environment Variable Handling **Values:** ```yaml # values-env-list.yaml extraEnvVars: - name: QDRANT_URI value: http://qdrant:6333 - name: QDRANT_API_KEY valueFrom: secretKeyRef: name: qdrant-api-key key: api-key ``` **Command:** ```sh helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-env-list.yaml ``` **Result:** ```yaml # Source: open-webui/templates/workload-manager.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: open-webui spec: template: spec: containers: - name: open-webui env: - name: "OLLAMA_BASE_URLS" value: "http://open-webui-ollama.owui.svc.cluster.local:11434" # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values - name: "OPENAI_API_BASE_URLS" value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1" - name: "OPENAI_API_KEYS" value: "0p3n-w3bu!" - name: QDRANT_URI value: http://qdrant:6333 - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key name: qdrant-api-key ``` --- **Values:** ```yaml # values-env-map.yaml extraEnvVars: QDRANT_URI: http://qdrant:6333 QDRANT_API_KEY: valueFrom: secretKeyRef: name: qdrant-api-key key: api-key ``` **Command:** ```sh helm template -s templates/workload-manager.yaml open-webui ./charts/open-webui -f ./values-env-map.yaml ``` **Result:** ```yaml # Source: open-webui/templates/workload-manager.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: open-webui spec: template: spec: containers: - name: open-webui env: - name: "OLLAMA_BASE_URLS" value: "http://open-webui-ollama.owui.svc.cluster.local:11434" # If Pipelines is enabled and OpenAI API value is set, use OPENAI_API_BASE_URLS with combined values - name: "OPENAI_API_BASE_URLS" value: "http://open-webui-pipelines.owui.svc.cluster.local:9099;https://api.openai.com/v1" - name: "OPENAI_API_KEYS" value: "0p3n-w3bu!" - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key name: qdrant-api-key - name: QDRANT_URI value: "http://qdrant:6333" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:17:22 -05:00
yindo closed this issue 2026-02-15 19:17:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/helm-charts#323