apiVersion: apps/v1 kind: Deployment metadata: name: n8n namespace: n8n spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: n8n template: metadata: labels: app: n8n spec: containers: - name: n8n image: docker.n8n.io/n8nio/n8n:2.32.7 imagePullPolicy: IfNotPresent ports: - containerPort: 5678 env: - name: N8N_HOST value: n8n.aleshym.co - name: N8N_PORT value: "5678" - name: N8N_PROTOCOL value: https - name: WEBHOOK_URL value: https://n8n.aleshym.co/ - name: N8N_EDITOR_BASE_URL value: https://n8n.aleshym.co/ - name: GENERIC_TIMEZONE value: America/Vancouver - name: TZ value: America/Vancouver - name: DB_TYPE value: postgresdb - name: DB_POSTGRESDB_HOST value: n8n-postgres - name: DB_POSTGRESDB_PORT value: "5432" - name: DB_POSTGRESDB_DATABASE value: n8n - name: DB_POSTGRESDB_USER valueFrom: secretKeyRef: name: n8n-secrets key: postgres-user - name: DB_POSTGRESDB_PASSWORD valueFrom: secretKeyRef: name: n8n-secrets key: postgres-password - name: N8N_ENCRYPTION_KEY valueFrom: secretKeyRef: name: n8n-secrets key: encryption-key - name: N8N_SECURE_COOKIE value: "true" - name: N8N_PROXY_HOPS value: "1" - name: N8N_SKIP_AUTH_ON_OAUTH_CALLBACK value: "true" - name: EXECUTIONS_DATA_PRUNE value: "true" - name: EXECUTIONS_DATA_MAX_AGE value: "336" volumeMounts: - name: n8n-data mountPath: /home/node/.n8n readinessProbe: httpGet: path: /healthz port: 5678 initialDelaySeconds: 15 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 6 livenessProbe: httpGet: path: /healthz port: 5678 initialDelaySeconds: 30 periodSeconds: 20 timeoutSeconds: 5 failureThreshold: 6 resources: requests: cpu: 100m memory: 256Mi limits: memory: 1Gi volumes: - name: n8n-data persistentVolumeClaim: claimName: n8n-data