Skip to content

Commit

Permalink
Merge pull request #88 from saip92/saip92/move-env-vars-to-stateful-set
Browse files Browse the repository at this point in the history
Move extraEnvVars to Workload from ConfigMap
  • Loading branch information
0xThresh authored Oct 2, 2024
2 parents 4ee3936 + 119fdd2 commit 4f1fa47
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 29 deletions.
2 changes: 1 addition & 1 deletion charts/open-webui/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: open-webui
version: 3.2.0
version: 3.3.0
appVersion: "0.3.24"

home: https://www.openwebui.com/
Expand Down
2 changes: 1 addition & 1 deletion charts/open-webui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ helm upgrade --install open-webui open-webui/open-webui
| annotations | object | `{}` | |
| clusterDomain | string | `"cluster.local"` | Value of cluster domain |
| containerSecurityContext | object | `{}` | Configure container security context ref: <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-containe> |
| extraEnvVars | list | `[{"name":"OPENAI_API_KEY","value":"0p3n-w3bu!"}]` | Env vars added to the configmap and mounted to the Open WebUI deployment. Most up-to-date environment variables can be found here: https://docs.openwebui.com/getting-started/env-configuration/ |
| extraEnvVars | list | `[{"name":"OPENAI_API_KEY","value":"0p3n-w3bu!"}]` | Env vars added to the Open WebUI deployment. Most up-to-date environment variables can be found here: https://docs.openwebui.com/getting-started/env-configuration/ |
| extraEnvVars[0] | object | `{"name":"OPENAI_API_KEY","value":"0p3n-w3bu!"}` | Default API key value for Pipelines. Should be updated in a production deployment, or be changed to the required API key if not using Pipelines |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/open-webui/open-webui","tag":""}` | Open WebUI image tags can be found here: https://github.com/open-webui/open-webui/pkgs/container/open-webui |
| imagePullSecrets | list | `[]` | Configure imagePullSecrets to use private registry ref: <https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry> |
Expand Down
22 changes: 0 additions & 22 deletions charts/open-webui/templates/configmap.yaml

This file was deleted.

20 changes: 16 additions & 4 deletions charts/open-webui/templates/workload-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,22 @@ spec:
volumeMounts:
- name: data
mountPath: /app/backend/data
{{- if or .Values.extraEnvVars .Values.ollama.enabled }}
envFrom:
- configMapRef:
name: {{ include "open-webui.name" . }}-env
env:
{{- if or .Values.ollamaUrls .Values.ollama.enabled }}
- name: "OLLAMA_BASE_URLS"
value: {{ include "ollamaBaseUrls" . | quote }}
{{- else }}
- name: "ENABLE_OLLAMA_API"
value: "False"
{{- end }}
- name: "OPENAI_API_BASE_URL"
{{- if .Values.pipelines.enabled }}
value: {{ include "pipelines.serviceEndpoint" . }}
{{- else if .Values.openaiBaseApiUrl }}
value: {{ .Values.openaiBaseApiUrl | quote }}
{{- end }}
{{- if .Values.extraEnvVars }}
{{- toYaml .Values.extraEnvVars | nindent 8 }}
{{- end }}
tty: true
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion charts/open-webui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ service:
# -- OpenAI base API URL to use. Defaults to the Pipelines service endpoint when Pipelines are enabled, and "https://api.openai.com/v1" if Pipelines are not enabled and this value is blank
openaiBaseApiUrl: ""

# -- Env vars added to the configmap and mounted to the Open WebUI deployment. Most up-to-date environment variables can be found here: https://docs.openwebui.com/getting-started/env-configuration/
# -- Env vars added to the Open WebUI deployment. Most up-to-date environment variables can be found here: https://docs.openwebui.com/getting-started/env-configuration/
extraEnvVars:
# -- Default API key value for Pipelines. Should be updated in a production deployment, or be changed to the required API key if not using Pipelines
- name: OPENAI_API_KEY
Expand Down

0 comments on commit 4f1fa47

Please sign in to comment.