Fixed n8n worker
This commit is contained in:
@@ -85,6 +85,8 @@ spec:
|
|||||||
value: "queue"
|
value: "queue"
|
||||||
- name: QUEUE_BULL_REDIS_HOST
|
- name: QUEUE_BULL_REDIS_HOST
|
||||||
value: "n8n-redis"
|
value: "n8n-redis"
|
||||||
|
- name: QUEUE_BULL_REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
- name: NODE_ENV
|
- name: NODE_ENV
|
||||||
value: "production"
|
value: "production"
|
||||||
- name: WEBHOOK_URL
|
- name: WEBHOOK_URL
|
||||||
@@ -132,7 +134,7 @@ spec:
|
|||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 4000m
|
cpu: 4000m
|
||||||
memory: 2048Gi
|
memory: 2048Mi
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
|
|||||||
84
k8s/apps/n8n/deployment-worker.yaml
Normal file
84
k8s/apps/n8n/deployment-worker.yaml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: n8n-worker
|
||||||
|
labels:
|
||||||
|
app: n8n
|
||||||
|
component: worker
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: n8n
|
||||||
|
component: worker
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: n8n
|
||||||
|
component: worker
|
||||||
|
spec:
|
||||||
|
serviceAccountName: n8n
|
||||||
|
containers:
|
||||||
|
- name: n8n-worker
|
||||||
|
image: n8nio/n8n:latest
|
||||||
|
command:
|
||||||
|
- n8n
|
||||||
|
- worker
|
||||||
|
env:
|
||||||
|
- name: HOME
|
||||||
|
value: "/home/node"
|
||||||
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
|
value: "true"
|
||||||
|
- name: EXECUTIONS_MODE
|
||||||
|
value: "queue"
|
||||||
|
- name: QUEUE_BULL_REDIS_HOST
|
||||||
|
value: "n8n-redis"
|
||||||
|
- name: QUEUE_BULL_REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: "production"
|
||||||
|
- name: GENERIC_TIMEZONE
|
||||||
|
value: "Europe/Moscow"
|
||||||
|
- name: TZ
|
||||||
|
value: "Europe/Moscow"
|
||||||
|
- name: DB_TYPE
|
||||||
|
value: "postgresdb"
|
||||||
|
- name: DB_POSTGRESDB_HOST
|
||||||
|
value: "psql.psql.svc"
|
||||||
|
- name: DB_POSTGRESDB_DATABASE
|
||||||
|
value: "n8n"
|
||||||
|
- name: DB_POSTGRESDB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: credentials
|
||||||
|
key: username
|
||||||
|
- name: DB_POSTGRESDB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: credentials
|
||||||
|
key: password
|
||||||
|
- name: N8N_ENCRYPTION_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: credentials
|
||||||
|
key: encryptionkey
|
||||||
|
volumeMounts:
|
||||||
|
- name: n8n-data
|
||||||
|
mountPath: /home/node/.n8n
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 2048Mi
|
||||||
|
volumes:
|
||||||
|
- name: n8n-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: n8n-data
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
fsGroup: 1000
|
||||||
@@ -10,7 +10,7 @@ resources:
|
|||||||
- paddleocr-deployment.yaml
|
- paddleocr-deployment.yaml
|
||||||
- paddleocr-service.yaml
|
- paddleocr-service.yaml
|
||||||
- deployment-main.yaml
|
- deployment-main.yaml
|
||||||
# - deployment-worker.yaml
|
- deployment-worker.yaml
|
||||||
- deployment-runner.yaml
|
- deployment-runner.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user