diff --git a/clusters/base/apps/openwebui/helmrelease.yaml b/clusters/base/apps/openwebui/helmrelease.yaml new file mode 100644 index 0000000..c73673d --- /dev/null +++ b/clusters/base/apps/openwebui/helmrelease.yaml @@ -0,0 +1,71 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: openwebui + namespace: ai +spec: + interval: 30m + chartRef: + kind: OCIRepository + name: openwebui + values: + controllers: + app: + containers: + app: + image: + repository: ghcr.io/open-webui/open-webui + tag: main + env: + TZ: Europe/Moscow + probes: + liveness: + enabled: true + readiness: + enabled: true + startup: + enabled: true + spec: + periodSeconds: 10 + failureThreshold: 30 # first boot pulls the embedding model + resources: + requests: + cpu: 200m + memory: 512Mi + limits: + memory: 2Gi + + service: + app: + controller: app + ports: + http: + port: 8080 + + ingress: + app: + className: traefik + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: ai2.aggtaa.com + paths: + - path: / + pathType: Prefix + service: + identifier: app + port: http + tls: + - secretName: openwebui-tls + hosts: + - ai2.aggtaa.com + + persistence: + data: + type: persistentVolumeClaim + accessMode: ReadWriteOnce + size: 10Gi + storageClass: longhorn + retain: true + globalMounts: + - path: /app/backend/data diff --git a/clusters/base/apps/openwebui/helmrepository.yaml b/clusters/base/apps/openwebui/helmrepository.yaml new file mode 100644 index 0000000..28b14b0 --- /dev/null +++ b/clusters/base/apps/openwebui/helmrepository.yaml @@ -0,0 +1,10 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: OCIRepository +metadata: + name: openwebui + namespace: ai +spec: + interval: 1h + url: oci://ghcr.io/bjw-s-labs/helm/app-template + ref: + tag: "5.0.1" diff --git a/clusters/base/apps/openwebui/kustomization.yaml b/clusters/base/apps/openwebui/kustomization.yaml new file mode 100644 index 0000000..d7fbb03 --- /dev/null +++ b/clusters/base/apps/openwebui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - helmrepository.yaml + - helmrelease.yaml diff --git a/clusters/base/namespaces/ai.yaml b/clusters/base/namespaces/ai.yaml new file mode 100644 index 0000000..7841f48 --- /dev/null +++ b/clusters/base/namespaces/ai.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ai diff --git a/clusters/home/apps/kustomization.yaml b/clusters/home/apps/kustomization.yaml index 5d1eade..e1c81e8 100644 --- a/clusters/home/apps/kustomization.yaml +++ b/clusters/home/apps/kustomization.yaml @@ -7,3 +7,4 @@ resources: - authelia.yaml - mosquitto.yaml - homeassistant.yaml + - openwebui.yaml diff --git a/clusters/home/apps/openwebui.yaml b/clusters/home/apps/openwebui.yaml new file mode 100644 index 0000000..fb2d41e --- /dev/null +++ b/clusters/home/apps/openwebui.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: openwebui + namespace: flux-system +spec: + interval: 10m + sourceRef: + kind: GitRepository + name: flux-system + path: ./clusters/base/apps/openwebui + prune: true + wait: true + dependsOn: + - name: namespaces + - name: infra + retryInterval: 5s diff --git a/clusters/home/namespaces/kustomization.yaml b/clusters/home/namespaces/kustomization.yaml index 4ee091c..fffe869 100644 --- a/clusters/home/namespaces/kustomization.yaml +++ b/clusters/home/namespaces/kustomization.yaml @@ -9,3 +9,4 @@ resources: - ../../base/namespaces/metallb-system.yaml - ../../base/namespaces/mqtt.yaml - ../../base/namespaces/homeassistant.yaml + - ../../base/namespaces/ai.yaml