webui-deployment.yaml 1.34 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 }}
duhow's avatar
duhow committed
19
20
21
22
        {{- with .Values.webui.image }}
        image: {{ .repository }}:{{ .tag }}
        imagePullPolicy: {{ .pullPolicy }}
        {{- end }}
23
        ports:
24
25
        - name: http
          containerPort: {{ .Values.webui.service.containerPort }}
duhow's avatar
duhow committed
26
27
        {{- with .Values.webui.resources }}
        resources: {{- toYaml . | nindent 10 }}
28
29
30
31
        {{- end }}
        volumeMounts:
        - name: webui-volume
          mountPath: /app/backend/data
32
33
        env:
        - name: OLLAMA_API_BASE_URL
duhow's avatar
duhow committed
34
          value: {{ printf "http://%s.%s.svc.cluster.local:%s/api" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.servicePort) | quote }}
35
36
37
38
39
40
41
42
        tty: true
      {{- with .Values.webui.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      volumes:
      - name: webui-volume
        persistentVolumeClaim:
duhow's avatar
duhow committed
43
          claimName: {{ include "open-webui.name" . }}