2023-12-24 16:34:33 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2024-02-19 21:58:25 +01:00
|
|
|
name: {{ include "open-webui.name" . }}
|
2024-02-19 22:23:36 +01:00
|
|
|
labels:
|
|
|
|
{{- include "open-webui.labels" . | nindent 4 }}
|
2024-02-19 23:22:10 +01:00
|
|
|
{{- with .Values.webui.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2023-12-24 16:34:33 +01:00
|
|
|
spec:
|
2024-02-19 22:33:22 +01:00
|
|
|
replicas: {{ .Values.webui.replicaCount }}
|
2023-12-24 16:34:33 +01:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2024-02-19 22:23:36 +01:00
|
|
|
{{- include "open-webui.selectorLabels" . | nindent 6 }}
|
2023-12-24 16:34:33 +01:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2024-02-19 22:33:22 +01:00
|
|
|
{{- include "open-webui.labels" . | nindent 8 }}
|
2024-02-19 23:22:10 +01:00
|
|
|
{{- with .Values.webui.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2023-12-24 16:34:33 +01:00
|
|
|
spec:
|
2024-02-19 23:32:50 +01:00
|
|
|
enableServiceLinks: false
|
|
|
|
automountServiceAccountToken: false
|
2023-12-24 16:34:33 +01:00
|
|
|
containers:
|
2024-02-19 21:58:25 +01:00
|
|
|
- name: {{ .Chart.Name }}
|
2024-02-19 22:43:03 +01:00
|
|
|
{{- with .Values.webui.image }}
|
2024-02-23 11:24:19 +01:00
|
|
|
image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }}
|
2024-02-19 22:43:03 +01:00
|
|
|
imagePullPolicy: {{ .pullPolicy }}
|
|
|
|
{{- end }}
|
2023-12-24 16:34:33 +01:00
|
|
|
ports:
|
2024-02-19 22:33:22 +01:00
|
|
|
- name: http
|
|
|
|
containerPort: {{ .Values.webui.service.containerPort }}
|
2024-02-19 22:23:36 +01:00
|
|
|
{{- with .Values.webui.resources }}
|
|
|
|
resources: {{- toYaml . | nindent 10 }}
|
2023-12-28 16:28:09 +01:00
|
|
|
{{- end }}
|
|
|
|
volumeMounts:
|
2024-02-19 23:18:06 +01:00
|
|
|
- name: data
|
2023-12-28 16:28:09 +01:00
|
|
|
mountPath: /app/backend/data
|
2023-12-24 16:34:33 +01:00
|
|
|
env:
|
2024-03-06 20:44:00 +01:00
|
|
|
- name: OLLAMA_BASE_URL
|
2024-02-19 23:32:50 +01:00
|
|
|
value: {{ include "ollama.url" . | quote }}
|
2023-12-28 16:28:09 +01:00
|
|
|
tty: true
|
|
|
|
{{- with .Values.webui.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
volumes:
|
2024-02-19 23:18:06 +01:00
|
|
|
{{- if and .Values.webui.persistence.enabled .Values.webui.persistence.existingClaim }}
|
|
|
|
- name: data
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.webui.persistence.existingClaim }}
|
|
|
|
{{- else if not .Values.webui.persistence.enabled }}
|
|
|
|
- name: data
|
|
|
|
emptyDir: {}
|
|
|
|
{{- else if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }}
|
|
|
|
- name: data
|
2023-12-28 16:28:09 +01:00
|
|
|
persistentVolumeClaim:
|
2024-02-19 21:58:25 +01:00
|
|
|
claimName: {{ include "open-webui.name" . }}
|
2024-02-19 23:18:06 +01:00
|
|
|
{{- end }}
|