webui-deployment.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: ollama-webui-deployment
  5. namespace: {{ .Values.namespace }}
  6. spec:
  7. replicas: 1
  8. selector:
  9. matchLabels:
  10. app: ollama-webui
  11. template:
  12. metadata:
  13. labels:
  14. app: ollama-webui
  15. spec:
  16. containers:
  17. - name: ollama-webui
  18. image: {{ .Values.webui.image }}
  19. ports:
  20. - containerPort: 8080
  21. {{- if .Values.webui.resources }}
  22. resources: {{- toYaml .Values.webui.resources | nindent 10 }}
  23. {{- end }}
  24. volumeMounts:
  25. - name: webui-volume
  26. mountPath: /app/backend/data
  27. env:
  28. - name: OLLAMA_API_BASE_URL
  29. value: "http://ollama-service.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.ollama.servicePort }}/api"
  30. tty: true
  31. {{- with .Values.webui.nodeSelector }}
  32. nodeSelector:
  33. {{- toYaml . | nindent 8 }}
  34. {{- end }}
  35. volumes:
  36. - name: webui-volume
  37. persistentVolumeClaim:
  38. claimName: ollama-webui-pvc