diff --git a/deployments/ai/openweb.yaml b/deployments/ai/openweb.yaml new file mode 100644 index 0000000..e2c52ea --- /dev/null +++ b/deployments/ai/openweb.yaml @@ -0,0 +1,76 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: ai +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openwebui + namespace: ai +spec: + replicas: 1 + selector: + matchLabels: + app: openwebui + template: + metadata: + labels: + app: openwebui + spec: + containers: + - name: openwebui + image: ghcr.io/open-webui/open-webui:latest + ports: + - containerPort: 8080 + env: + - name: OLLAMA_BASE_URL + value: http://ollama:11434 + volumeMounts: + - name: ai-storage + mountPath: /app/backend/data + volumes: + - name: ai-storage + hostPath: + path: /dpool/files/ai/ + type: Directory +--- +apiVersion: v1 +kind: Service +metadata: + name: openwebui + namespace: ai +spec: + selector: + app: openwebui + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: openwebui + namespace: ai + annotations: + kubernetes.io/ingress.class: "traefik" + external-dns.alpha.kubernetes.io/hostname: nc.hxme.net +spec: + rules: + - host: ai.hxme.net + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: openwebui + port: + number: 80 + tls: + - hosts: + - ai.hxme.net + secretName: openwebui-tls +