mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 11:04:43 +02:00
feat(k8s): déployer Open WebUI + n8n sur namespace ai via ArgoCD
Open WebUI (openwebui.lab.local) : - Connecté à LiteLLM (192.168.10.1:4000/v1) comme backend OpenAI-compatible - PostgreSQL via storage-01 pour l'historique des conversations - PVC 5Gi NFS pour les uploads, Traefik IngressRoute n8n (n8n.lab.local) : - PostgreSQL via storage-01, chiffrement des credentials - PVC 2Gi NFS, Traefik IngressRoute - Webhook URL interne : http://n8n.lab.local Ansible : ajoute openwebui et n8n dans postgresql_databases/users (vault_pg_openwebui_password + vault_pg_n8n_password à ajouter au vault) Prérequis avant 1er déploiement : make vault-edit # ajouter les 2 passwords make apply-storage --tags postgresql kubectl create secret generic open-webui-secret -n ai ... kubectl create secret generic n8n-secret -n ai ... Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3cd374630d
commit
bc137d13b4
11 changed files with 285 additions and 1 deletions
71
k8s/apps/open-webui/deployment.yaml
Normal file
71
k8s/apps/open-webui/deployment.yaml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: open-webui
|
||||
namespace: ai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: open-webui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: open-webui
|
||||
spec:
|
||||
containers:
|
||||
- name: open-webui
|
||||
image: ghcr.io/open-webui/open-webui:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
# LiteLLM comme backend OpenAI-compatible
|
||||
- name: OPENAI_API_BASE_URL
|
||||
value: "http://192.168.10.1:4000/v1"
|
||||
- name: OPENAI_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: open-webui-secret
|
||||
key: litellm-api-key
|
||||
# PostgreSQL — migrations automatiques au démarrage
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: open-webui-secret
|
||||
key: database-url
|
||||
# Clé de session
|
||||
- name: WEBUI_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: open-webui-secret
|
||||
key: webui-secret-key
|
||||
# Désactiver Ollama (on passe par LiteLLM)
|
||||
- name: ENABLE_OLLAMA_API
|
||||
value: "false"
|
||||
- name: OLLAMA_BASE_URL
|
||||
value: ""
|
||||
# Nom affiché dans l'interface
|
||||
- name: WEBUI_NAME
|
||||
value: "Funk AI"
|
||||
- name: DEFAULT_LOCALE
|
||||
value: "fr-FR"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/backend/data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: open-webui-data
|
||||
Loading…
Add table
Add a link
Reference in a new issue