mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 20:34:42 +02:00
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>
82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: n8n
|
|
namespace: ai
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: n8n
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: n8n
|
|
spec:
|
|
containers:
|
|
- name: n8n
|
|
image: n8nio/n8n:latest
|
|
ports:
|
|
- containerPort: 5678
|
|
env:
|
|
# PostgreSQL
|
|
- name: DB_TYPE
|
|
value: "postgresdb"
|
|
- name: DB_POSTGRESDB_HOST
|
|
value: "192.168.10.1"
|
|
- name: DB_POSTGRESDB_PORT
|
|
value: "5432"
|
|
- name: DB_POSTGRESDB_DATABASE
|
|
value: "n8n"
|
|
- name: DB_POSTGRESDB_USER
|
|
value: "n8n"
|
|
- name: DB_POSTGRESDB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: n8n-secret
|
|
key: db-password
|
|
# Clé de chiffrement des credentials
|
|
- name: N8N_ENCRYPTION_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: n8n-secret
|
|
key: encryption-key
|
|
# URLs
|
|
- name: N8N_HOST
|
|
value: "0.0.0.0"
|
|
- name: N8N_PORT
|
|
value: "5678"
|
|
- name: N8N_PROTOCOL
|
|
value: "http"
|
|
- name: WEBHOOK_URL
|
|
value: "http://n8n.lab.local"
|
|
- name: N8N_EDITOR_BASE_URL
|
|
value: "http://n8n.lab.local"
|
|
# Timezone
|
|
- name: GENERIC_TIMEZONE
|
|
value: "Europe/Paris"
|
|
- name: TZ
|
|
value: "Europe/Paris"
|
|
# Désactiver la télémétrie
|
|
- name: N8N_DIAGNOSTICS_ENABLED
|
|
value: "false"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /home/node/.n8n
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 5678
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: n8n-data
|