Files
k8s-manifests/n8n/deployment-n8n.yaml
chemavxandClaude Opus 4.8 77f55fb100 n8n: repoint encryption-key secretKeyRef to n8n-secret-infisical + Recreate
Cut n8n over to the Infisical-synced encryption key (byte-identical, key never
changes -> credentials stay decryptable) and switch RollingUpdate -> Recreate
(485MB SQLite + WAL on RWO must not have two writers during a roll).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:31:10 +00:00

69 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n
namespace: n8n
spec:
replicas: 1
selector:
matchLabels:
app: n8n
# Single-replica n8n with a 485MB SQLite DB (+ active WAL) on a RWO local-path
# PVC: Recreate fully terminates the old pod (releasing the PVC and closing the
# SQLite-WAL) before the new pod starts — avoids two writers racing one DB file
# (RollingUpdate would surge a 2nd pod first).
strategy:
type: Recreate
template:
metadata:
labels:
app: n8n
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
containers:
- name: n8n
image: git.chemavx.xyz/chemavx/n8n:01d60680
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5678
env:
- name: N8N_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: n8n-secret-infisical
key: encryption-key
- name: N8N_HOST
value: n8n.chemavx.xyz
- name: N8N_PORT
value: "5678"
- name: N8N_PROTOCOL
value: https
- name: WEBHOOK_URL
value: https://n8n.chemavx.xyz/
- name: N8N_USER_FOLDER
value: /home/node/.n8n
- name: NODE_FUNCTION_ALLOW_EXTERNAL
value: "*"
- name: GENERIC_TIMEZONE
value: Europe/Madrid
- name: DB_TYPE
value: sqlite
- name: DB_SQLITE_DATABASE
value: /home/node/.n8n/database.sqlite
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1Gi
volumeMounts:
- name: n8n-data
mountPath: /home/node/.n8n
volumes:
- name: n8n-data
persistentVolumeClaim:
claimName: n8n-pvc