webui-deployment.yaml 1.96 KB
Newer Older
1
2
3
apiVersion: apps/v1
kind: Deployment
metadata:
duhow's avatar
duhow committed
4
  name: {{ include "open-webui.name" . }}
duhow's avatar
duhow committed
5
6
  labels:
    {{- include "open-webui.labels" . | nindent 4 }}
duhow's avatar
duhow committed
7
8
9
10
  {{- with .Values.webui.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
11
spec:
12
  replicas: {{ .Values.webui.replicaCount }}
13
14
  selector:
    matchLabels:
duhow's avatar
duhow committed
15
      {{- include "open-webui.selectorLabels" . | nindent 6 }}
16
17
18
  template:
    metadata:
      labels:
19
        {{- include "open-webui.labels" . | nindent 8 }}
duhow's avatar
duhow committed
20
21
22
23
      {{- with .Values.webui.podAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
24
    spec:
duhow's avatar
duhow committed
25
26
      enableServiceLinks: false
      automountServiceAccountToken: false
27
      containers:
duhow's avatar
duhow committed
28
      - name: {{ .Chart.Name }}
duhow's avatar
duhow committed
29
        {{- with .Values.webui.image }}
duhow's avatar
duhow committed
30
        image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }}
duhow's avatar
duhow committed
31
32
        imagePullPolicy: {{ .pullPolicy }}
        {{- end }}
33
        ports:
34
35
        - name: http
          containerPort: {{ .Values.webui.service.containerPort }}
duhow's avatar
duhow committed
36
37
        {{- with .Values.webui.resources }}
        resources: {{- toYaml . | nindent 10 }}
38
39
        {{- end }}
        volumeMounts:
duhow's avatar
duhow committed
40
        - name: data
41
          mountPath: /app/backend/data
42
        env:
43
        - name: OLLAMA_BASE_URL
duhow's avatar
duhow committed
44
          value: {{ include "ollama.url" . | quote }}
45
46
47
48
49
50
        tty: true
      {{- with .Values.webui.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      volumes:
duhow's avatar
duhow committed
51
52
53
54
55
56
57
58
59
      {{- 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
60
        persistentVolumeClaim:
duhow's avatar
duhow committed
61
          claimName: {{ include "open-webui.name" . }}
duhow's avatar
duhow committed
62
      {{- end }}