Files
infra-apps/n8n/deployment.yaml
kappa d6973488f1 Fix n8n DB host to pgcat.db.svc.cluster.local
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 16:30:32 +09:00

83 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n
labels:
app: n8n
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: n8n
template:
metadata:
labels:
app: n8n
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: n8n
image: n8nio/n8n:latest
ports:
- containerPort: 5678
env:
- name: N8N_PORT
value: "5678"
- name: DB_TYPE
value: postgresdb
- name: DB_POSTGRESDB_HOST
value: pgcat.db.svc.cluster.local
- name: DB_POSTGRESDB_PORT
value: "6432"
- name: DB_POSTGRESDB_DATABASE
value: n8n
- name: DB_POSTGRESDB_USER
value: n8n
- name: DB_POSTGRESDB_PASSWORD
value: n8n
- name: N8N_HOST
value: n8n.inouter.com
- name: N8N_PROTOCOL
value: https
- name: WEBHOOK_URL
value: https://n8n.inouter.com/
- name: GENERIC_TIMEZONE
value: Asia/Seoul
- name: N8N_PROXY_HOPS
value: "3"
livenessProbe:
httpGet:
path: /healthcheck
port: 5678
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 5
readinessProbe:
httpGet:
path: /healthcheck
port: 5678
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumeMounts:
- name: data
mountPath: /home/node/.n8n
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: "1"
memory: 1Gi
volumes:
- name: data
persistentVolumeClaim:
claimName: n8n-data