webui-deployment.yaml 1.23 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 }}
7
spec:
8
  replicas: {{ .Values.webui.replicaCount }}
9
10
  selector:
    matchLabels:
duhow's avatar
duhow committed
11
      {{- include "open-webui.selectorLabels" . | nindent 6 }}
12
13
14
  template:
    metadata:
      labels:
15
        {{- include "open-webui.labels" . | nindent 8 }}
16
17
    spec:
      containers:
duhow's avatar
duhow committed
18
      - name: {{ .Chart.Name }}
19
        image: {{ .Values.webui.image }}
20
        ports:
21
22
        - name: http
          containerPort: {{ .Values.webui.service.containerPort }}
duhow's avatar
duhow committed
23
24
        {{- with .Values.webui.resources }}
        resources: {{- toYaml . | nindent 10 }}
25
26
27
28
        {{- end }}
        volumeMounts:
        - name: webui-volume
          mountPath: /app/backend/data
29
30
        env:
        - name: OLLAMA_API_BASE_URL
duhow's avatar
duhow committed
31
          value: {{ printf "http://%s.%s.svc.cluster.local:%s/api" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.servicePort) | quote }}
32
33
34
35
36
37
38
39
        tty: true
      {{- with .Values.webui.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      volumes:
      - name: webui-volume
        persistentVolumeClaim:
duhow's avatar
duhow committed
40
          claimName: {{ include "open-webui.name" . }}