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