From de66118c42cccec56eff1627542134b3e93c8a13 Mon Sep 17 00:00:00 2001 From: Mads Brouer Date: Thu, 5 Dec 2024 11:57:31 +0100 Subject: [PATCH 1/3] feat: Support for podLabels --- charts/open-webui/templates/workload-manager.yaml | 3 +++ charts/open-webui/values.yaml | 1 + charts/pipelines/templates/deployment.yaml | 3 +++ charts/pipelines/values.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/charts/open-webui/templates/workload-manager.yaml b/charts/open-webui/templates/workload-manager.yaml index 18a42de..7518c9a 100644 --- a/charts/open-webui/templates/workload-manager.yaml +++ b/charts/open-webui/templates/workload-manager.yaml @@ -24,6 +24,9 @@ spec: metadata: labels: {{- include "open-webui.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 61aa7f3..68ef561 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -36,6 +36,7 @@ clusterDomain: cluster.local annotations: {} podAnnotations: {} +podLabels: {} replicaCount: 1 # -- Open WebUI image tags can be found here: https://github.com/open-webui/open-webui/pkgs/container/open-webui image: diff --git a/charts/pipelines/templates/deployment.yaml b/charts/pipelines/templates/deployment.yaml index 1948652..89b90d9 100644 --- a/charts/pipelines/templates/deployment.yaml +++ b/charts/pipelines/templates/deployment.yaml @@ -17,6 +17,9 @@ spec: metadata: labels: {{- include "pipelines.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} diff --git a/charts/pipelines/values.yaml b/charts/pipelines/values.yaml index a1e02aa..0214826 100644 --- a/charts/pipelines/values.yaml +++ b/charts/pipelines/values.yaml @@ -5,6 +5,7 @@ clusterDomain: cluster.local annotations: {} podAnnotations: {} +podLabels: {} replicaCount: 1 image: repository: ghcr.io/open-webui/pipelines From aa0c381f016ea3525fc47c1f638b682f3b127562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolo=CC=80=20Ciraci?= Date: Thu, 5 Dec 2024 15:47:51 +0100 Subject: [PATCH 2/3] fix(namespace): add namespace explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolò Ciraci --- .gitignore | 129 ++++++++++++++++++ charts/pipelines/Chart.yaml | 2 +- charts/pipelines/templates/_helpers.tpl | 11 ++ charts/pipelines/templates/deployment.yaml | 2 +- charts/pipelines/templates/pvc.yaml | 1 + .../pipelines/templates/service-account.yaml | 1 + charts/pipelines/templates/service.yaml | 1 + charts/pipelines/values.yaml | 1 + 8 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c38af40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,129 @@ +# Created by https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,intellij+all,helm + +### Helm ### +# Chart dependencies +**/charts/*.tgz + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm \ No newline at end of file diff --git a/charts/pipelines/Chart.yaml b/charts/pipelines/Chart.yaml index ce4e702..20a06ea 100644 --- a/charts/pipelines/Chart.yaml +++ b/charts/pipelines/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: pipelines -version: 0.0.5 +version: 0.0.6 appVersion: "alpha" home: https://github.com/open-webui/pipelines diff --git a/charts/pipelines/templates/_helpers.tpl b/charts/pipelines/templates/_helpers.tpl index b4cb5ab..a33f23a 100644 --- a/charts/pipelines/templates/_helpers.tpl +++ b/charts/pipelines/templates/_helpers.tpl @@ -1,3 +1,14 @@ +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "pipelines.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + {{/* Set the name of the Pipelines resources */}} diff --git a/charts/pipelines/templates/deployment.yaml b/charts/pipelines/templates/deployment.yaml index 1948652..1edfa39 100644 --- a/charts/pipelines/templates/deployment.yaml +++ b/charts/pipelines/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "pipelines.name" . }} + namespace: {{ include "pipelines.namespace" . }} labels: {{- include "pipelines.labels" . | nindent 4 }} {{- with .Values.annotations }} @@ -31,7 +32,6 @@ spec: {{- if .Values.serviceAccount.enable }} serviceAccountName: {{ .Values.serviceAccount.name | default (include "pipelines.name" .) }} {{- end }} - containers: - name: {{ .Chart.Name }} {{- with .Values.image }} diff --git a/charts/pipelines/templates/pvc.yaml b/charts/pipelines/templates/pvc.yaml index 87af4a7..c16f12a 100644 --- a/charts/pipelines/templates/pvc.yaml +++ b/charts/pipelines/templates/pvc.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ include "pipelines.name" . }} + namespace: {{ include "pipelines.namespace" . }} labels: {{- include "pipelines.selectorLabels" . | nindent 4 }} {{- with .Values.persistence.annotations }} diff --git a/charts/pipelines/templates/service-account.yaml b/charts/pipelines/templates/service-account.yaml index c37a383..4da3f3e 100644 --- a/charts/pipelines/templates/service-account.yaml +++ b/charts/pipelines/templates/service-account.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.serviceAccount.name | default (include "pipelines.name" .) }} + namespace: {{ include "pipelines.namespace" . }} labels: {{- include "pipelines.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} diff --git a/charts/pipelines/templates/service.yaml b/charts/pipelines/templates/service.yaml index 811d125..746fa35 100644 --- a/charts/pipelines/templates/service.yaml +++ b/charts/pipelines/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "pipelines.name" . }} + namespace: {{ include "pipelines.namespace" . }} labels: {{- include "pipelines.labels" . | nindent 4 }} {{- with .Values.service.labels }} diff --git a/charts/pipelines/values.yaml b/charts/pipelines/values.yaml index a1e02aa..eb21501 100644 --- a/charts/pipelines/values.yaml +++ b/charts/pipelines/values.yaml @@ -1,4 +1,5 @@ nameOverride: "" +namespaceOverride: "" # -- Value of cluster domain clusterDomain: cluster.local From fe7d2bb946517bcea484d840e5df1ec404cc15e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolo=CC=80=20Ciraci?= Date: Thu, 5 Dec 2024 15:49:51 +0100 Subject: [PATCH 3/3] fix(namespace): add namespace explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolò Ciraci --- .gitignore | 129 ++++++++++++++++++ charts/open-webui/Chart.yaml | 2 +- charts/open-webui/README.md | 3 +- charts/open-webui/templates/_helpers.tpl | 11 ++ charts/open-webui/templates/ingress.yaml | 1 + charts/open-webui/templates/pvc.yaml | 1 + .../open-webui/templates/service-account.yaml | 1 + charts/open-webui/templates/service.yaml | 1 + .../templates/workload-manager.yaml | 1 + charts/open-webui/values.yaml | 1 + 10 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c38af40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,129 @@ +# Created by https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,intellij+all,helm + +### Helm ### +# Chart dependencies +**/charts/*.tgz + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm \ No newline at end of file diff --git a/charts/open-webui/Chart.yaml b/charts/open-webui/Chart.yaml index 91bafa4..1d6b56f 100644 --- a/charts/open-webui/Chart.yaml +++ b/charts/open-webui/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: open-webui -version: 4.0.6 +version: 4.0.7 appVersion: 0.4.7 home: https://www.openwebui.com/ icon: >- diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index df3e039..321b09b 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -1,6 +1,6 @@ # open-webui -![Version: 4.0.6](https://img.shields.io/badge/Version-4.0.6-informational?style=flat-square) ![AppVersion: 0.4.7](https://img.shields.io/badge/AppVersion-0.4.7-informational?style=flat-square) +![Version: 4.0.7](https://img.shields.io/badge/Version-4.0.7-informational?style=flat-square) ![AppVersion: 0.4.7](https://img.shields.io/badge/AppVersion-0.4.7-informational?style=flat-square) Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋 @@ -57,6 +57,7 @@ helm upgrade --install open-webui open-webui/open-webui | ingress.host | string | `""` | | | ingress.tls | bool | `false` | | | nameOverride | string | `""` | | +| namespaceOverride | string | `""` | | | nodeSelector | object | `{}` | Node labels for pod assignment. | | ollama.enabled | bool | `true` | Automatically install Ollama Helm chart from https://otwld.github.io/ollama-helm/. Use [Helm Values](https://github.com/otwld/ollama-helm/#helm-values) to configure | | ollama.fullnameOverride | string | `"open-webui-ollama"` | If enabling embedded Ollama, update fullnameOverride to your desired Ollama name value, or else it will use the default ollama.name value from the Ollama chart | diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 90381f5..38b3067 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -1,3 +1,14 @@ +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "open-webui.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} + {{/* Set the name of the Open WebUI resources */}} diff --git a/charts/open-webui/templates/ingress.yaml b/charts/open-webui/templates/ingress.yaml index 8ea1025..6b89ff4 100644 --- a/charts/open-webui/templates/ingress.yaml +++ b/charts/open-webui/templates/ingress.yaml @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "open-webui.name" . }} + namespace: {{ include "open-webui.namespace" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} diff --git a/charts/open-webui/templates/pvc.yaml b/charts/open-webui/templates/pvc.yaml index 529ef43..c412e7f 100644 --- a/charts/open-webui/templates/pvc.yaml +++ b/charts/open-webui/templates/pvc.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ include "open-webui.name" . }} + namespace: {{ include "open-webui.namespace" . }} labels: {{- include "open-webui.selectorLabels" . | nindent 4 }} {{- with .Values.persistence.annotations }} diff --git a/charts/open-webui/templates/service-account.yaml b/charts/open-webui/templates/service-account.yaml index 393f3c4..ecea069 100644 --- a/charts/open-webui/templates/service-account.yaml +++ b/charts/open-webui/templates/service-account.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.serviceAccount.name | default (include "open-webui.name" .) }} + namespace: {{ include "open-webui.namespace" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} diff --git a/charts/open-webui/templates/service.yaml b/charts/open-webui/templates/service.yaml index f0d0e4a..bce51b6 100644 --- a/charts/open-webui/templates/service.yaml +++ b/charts/open-webui/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "open-webui.name" . }} + namespace: {{ include "open-webui.namespace" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} {{- with .Values.service.labels }} diff --git a/charts/open-webui/templates/workload-manager.yaml b/charts/open-webui/templates/workload-manager.yaml index 18a42de..7aaa3c0 100644 --- a/charts/open-webui/templates/workload-manager.yaml +++ b/charts/open-webui/templates/workload-manager.yaml @@ -6,6 +6,7 @@ kind: Deployment {{- end }} metadata: name: {{ include "open-webui.name" . }} + namespace: {{ include "open-webui.namespace" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} {{- with .Values.annotations }} diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 61aa7f3..cd7749f 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -1,4 +1,5 @@ nameOverride: "" +namespaceOverride: "" ollama: # -- Automatically install Ollama Helm chart from https://otwld.github.io/ollama-helm/. Use [Helm Values](https://github.com/otwld/ollama-helm/#helm-values) to configure