[PR #259] [MERGED] feat(open-webui): handle usage of tpl function in ingress annotations #288

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/helm-charts/pull/259
Author: @this-is-tobi
Created: 7/1/2025
Status: Merged
Merged: 7/15/2025
Merged by: @westbrook-ai

Base: mainHead: feat/handle-ingress-annotations-tpl


📝 Commits (1)

  • ec26900 feat(open-webui): handle usage of tpl function in ingress annotations

📊 Changes

3 files changed (+4 additions, -4 deletions)

View changed files

📝 charts/open-webui/Chart.yaml (+1 -1)
📝 charts/open-webui/README.md (+1 -1)
📝 charts/open-webui/templates/ingress.yaml (+2 -2)

📄 Description

Explanation

Added the Helm tpl function for input annotations, allowing the annotation value to be dynamically allocated by retrieving it from a value file. A concrete use case is the generation of a whitelist of IP addresses maintained as code.

Tests

Values file:

# ./charts/open-webui/test-values.yaml

whitelist:
- '10.0.0.0/24'
- '172.10.0.0/24'

ingress:
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: '{{ .Values.whitelist | join "," | default "0.0.0.0/0" }}'

Command used to test:

helm template open-webui ./charts/open-webui -f ./charts/open-webui/test-values.yaml --debug

Output without the change:

---
# Source: open-webui/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: open-webui
  namespace: b2quddozf6clacdtw93b6zz0x--dzacun734yr0yh3mif8bdxdzi
  labels:
    helm.sh/chart: open-webui-6.22.0
    app.kubernetes.io/version: "0.6.15"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: open-webui
    app.kubernetes.io/component: open-webui
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: '{{ .Values.whitelist | join ","
      | default "0.0.0.0/0" }}'
spec:
  rules:
  - host: chat.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: open-webui
            port:
              name: http

Output with the change:

---
# Source: open-webui/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: open-webui
  namespace: b2quddozf6clacdtw93b6zz0x--dzacun734yr0yh3mif8bdxdzi
  labels:
    helm.sh/chart: open-webui-6.23.0
    app.kubernetes.io/version: "0.6.15"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: open-webui
    app.kubernetes.io/component: open-webui
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: '10.0.0.0/24,172.10.0.0/24'
spec:
  rules:
  - host: chat.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: open-webui
            port:
              name: http

🔄 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/259 **Author:** [@this-is-tobi](https://github.com/this-is-tobi) **Created:** 7/1/2025 **Status:** ✅ Merged **Merged:** 7/15/2025 **Merged by:** [@westbrook-ai](https://github.com/westbrook-ai) **Base:** `main` ← **Head:** `feat/handle-ingress-annotations-tpl` --- ### 📝 Commits (1) - [`ec26900`](https://github.com/open-webui/helm-charts/commit/ec26900d7e82884d0958b8c9a4a190156299cb52) feat(open-webui): handle usage of tpl function in ingress annotations ### 📊 Changes **3 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `charts/open-webui/Chart.yaml` (+1 -1) 📝 `charts/open-webui/README.md` (+1 -1) 📝 `charts/open-webui/templates/ingress.yaml` (+2 -2) </details> ### 📄 Description ## Explanation Added the [Helm tpl](https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function) function for input annotations, allowing the annotation value to be dynamically allocated by retrieving it from a value file. A concrete use case is the generation of a whitelist of IP addresses maintained as code. ## Tests Values file: ```yaml # ./charts/open-webui/test-values.yaml whitelist: - '10.0.0.0/24' - '172.10.0.0/24' ingress: enabled: true annotations: nginx.ingress.kubernetes.io/whitelist-source-range: '{{ .Values.whitelist | join "," | default "0.0.0.0/0" }}' ``` Command used to test: ```sh helm template open-webui ./charts/open-webui -f ./charts/open-webui/test-values.yaml --debug ``` Output without the change: ```yaml --- # Source: open-webui/templates/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: open-webui namespace: b2quddozf6clacdtw93b6zz0x--dzacun734yr0yh3mif8bdxdzi labels: helm.sh/chart: open-webui-6.22.0 app.kubernetes.io/version: "0.6.15" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: open-webui app.kubernetes.io/component: open-webui annotations: nginx.ingress.kubernetes.io/whitelist-source-range: '{{ .Values.whitelist | join "," | default "0.0.0.0/0" }}' spec: rules: - host: chat.example.com http: paths: - path: / pathType: Prefix backend: service: name: open-webui port: name: http ``` Output with the change: ```yaml --- # Source: open-webui/templates/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: open-webui namespace: b2quddozf6clacdtw93b6zz0x--dzacun734yr0yh3mif8bdxdzi labels: helm.sh/chart: open-webui-6.23.0 app.kubernetes.io/version: "0.6.15" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: open-webui app.kubernetes.io/component: open-webui annotations: nginx.ingress.kubernetes.io/whitelist-source-range: '10.0.0.0/24,172.10.0.0/24' spec: rules: - host: chat.example.com http: paths: - path: / pathType: Prefix backend: service: name: open-webui port: name: http ``` --- <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:13 -05:00
yindo closed this issue 2026-02-15 19:17:13 -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#288