Add Open-WebUI for AI chat.

This commit is contained in:
Joseph Hanson 2024-07-17 14:54:16 -05:00
parent 09642a8de9
commit 3ebcf13282
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
4 changed files with 105 additions and 0 deletions

View file

@ -7,3 +7,4 @@ resources:
- ./namespace.yaml
# Flux-Kustomizations
- ./ollama/ks.yaml
- ./open-webui/ks.yaml

View file

@ -0,0 +1,69 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app open-webui
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.2.1
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: rollback
values:
controllers:
open-webui:
annotations:
reloader.stakater.com/auto: "true"
containers:
app:
image:
repository: ghcr.io/open-webui/open-webui
tag: git-82079e6
env:
- name: OLLAMA_BASE_URL
value: ollama.ai.svc.cluster.local
resources:
requests:
cpu: 500m
memory: 2Gi
limits:
memory: 2Gi
service:
app:
controller: open-webui
ports:
http:
port: 8080
ingress:
app:
enabled: true
className: internal-nginx
hosts:
- host: &host "chat.jahanson.tech"
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: *app
globalMounts:
- path: /app/backend/data

View file

@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ../../../../templates/volsync

View file

@ -0,0 +1,28 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app open-webui
namespace: flux-system
spec:
targetNamespace: ai
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: volsync
- name: ollama
path: ./kubernetes/apps/ai/open-webui/app
prune: true
sourceRef:
kind: GitRepository
name: homelab
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app
VOLSYNC_CAPACITY: 5Gi