mirror of
https://github.com/open-webui/open-webui
synced 2024-11-21 23:57:51 +00:00
update storage definition
This commit is contained in:
parent
4608afa5b9
commit
34b7fd18c7
@ -21,6 +21,7 @@ spec:
|
||||
image: {{ .repository }}:{{ .tag }}
|
||||
imagePullPolicy: {{ .pullPolicy }}
|
||||
{{- end }}
|
||||
tty: true
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.ollama.service.containerPort }}
|
||||
@ -37,9 +38,8 @@ spec:
|
||||
resources: {{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: ollama-volume
|
||||
- name: data
|
||||
mountPath: /root/.ollama
|
||||
tty: true
|
||||
{{- with .Values.ollama.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
@ -48,11 +48,36 @@ spec:
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if and .Values.ollama.persistence.enabled .Values.ollama.persistence.existingClaim }}
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.ollama.persistence.existingClaim }}
|
||||
{{- else if not .Values.ollama.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else if and .Values.ollama.persistence.enabled (not .Values.ollama.persistence.existingClaim) }}
|
||||
{}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: ollama-volume
|
||||
name: data
|
||||
labels:
|
||||
{{- include "ollama.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.ollama.persistence.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
accessModes:
|
||||
{{- range .Values.ollama.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.ollama.persistence.size }}
|
||||
storage: {{ .Values.ollama.persistence.size | quote }}
|
||||
storageClass: {{ .Values.ollama.persistence.storageClass }}
|
||||
{{- with .Values.ollama.persistence.selector }}
|
||||
selector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -27,7 +27,7 @@ spec:
|
||||
resources: {{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: webui-volume
|
||||
- name: data
|
||||
mountPath: /app/backend/data
|
||||
env:
|
||||
- name: OLLAMA_API_BASE_URL
|
||||
@ -38,6 +38,15 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: webui-volume
|
||||
{{- 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
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "open-webui.name" . }}
|
||||
{{- end }}
|
||||
|
@ -1,11 +1,25 @@
|
||||
{{- if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "open-webui.name" . }}
|
||||
labels:
|
||||
{{- include "open-webui.selectorLabels" . | nindent 4 }}
|
||||
{{- with .Values.webui.persistence.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
accessModes:
|
||||
{{- range .Values.webui.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.webui.persistence.size }}
|
||||
storageClass: {{ .Values.webui.persistence.storageClass }}
|
||||
{{- with .Values.webui.persistence.selector }}
|
||||
selector:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -8,6 +8,11 @@ ollama:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 30Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: ""
|
||||
selector: {}
|
||||
annotations: {}
|
||||
nodeSelector: {}
|
||||
tolerations:
|
||||
- key: nvidia.com/gpu
|
||||
@ -18,6 +23,7 @@ ollama:
|
||||
port: 80
|
||||
containerPort: 11434
|
||||
gpu:
|
||||
# -- Enable additional ENV values to help Ollama discover GPU usage
|
||||
enabled: false
|
||||
|
||||
webui:
|
||||
@ -35,7 +41,13 @@ webui:
|
||||
host: ""
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 2Gi
|
||||
size: 30Gi
|
||||
# -- If using multiple replicas, you must update accessModes to ReadWriteMany
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: ""
|
||||
selector: {}
|
||||
annotations: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
service:
|
||||
|
Loading…
Reference in New Issue
Block a user