335 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			335 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| n8n:
 | |
|   controllers:
 | |
|     main:
 | |
|       type: deployment
 | |
|       replicas: 1
 | |
|       strategy: Recreate
 | |
|       revisionHistoryLimit: 3
 | |
|       containers:
 | |
|         main:
 | |
|           image:
 | |
|             repository: ghcr.io/n8n-io/n8n
 | |
|             tag: 1.111.0
 | |
|             pullPolicy: IfNotPresent
 | |
|           env:
 | |
|             - name: GENERIC_TIMEZONE
 | |
|               value: US/Central
 | |
|             - name: DB_TYPE
 | |
|               value: postgresdb
 | |
|             - name: DB_POSTGRESDB_DATABASE
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: dbname
 | |
|             - name: DB_POSTGRESDB_HOST
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: host
 | |
|             - name: DB_POSTGRESDB_PORT
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: port
 | |
|             - name: DB_POSTGRESDB_USER
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: user
 | |
|             - name: DB_POSTGRESDB_PASSWORD
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: password
 | |
|             - name: N8N_METRICS
 | |
|               value: true
 | |
|             - name: QUEUE_HEALTH_CHECK_ACTIVE
 | |
|               value: true
 | |
|             - name: EXECUTIONS_MODE
 | |
|               value: queue
 | |
|             - name: QUEUE_BULL_REDIS_HOST
 | |
|               value: redis-replication-n8n-master.n8n
 | |
|             - name: N8N_ENCRYPTION_KEY
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-config-secret
 | |
|                   key: key
 | |
|             - name: WEBHOOK_URL
 | |
|               value: https://n8n.alexlebens.net/
 | |
|           probes:
 | |
|             liveness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|             readiness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz/readiness
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|           resources:
 | |
|             requests:
 | |
|               cpu: 10m
 | |
|               memory: 128Mi
 | |
|     worker:
 | |
|       type: daemonset
 | |
|       revisionHistoryLimit: 3
 | |
|       pod:
 | |
|         nodeSelector:
 | |
|           kubernetes.io/arch: amd64
 | |
|       containers:
 | |
|         main:
 | |
|           image:
 | |
|             repository: ghcr.io/n8n-io/n8n
 | |
|             tag: 1.111.0
 | |
|             pullPolicy: IfNotPresent
 | |
|           command:
 | |
|             - n8n
 | |
|           args:
 | |
|             - worker
 | |
|             - --concurrency=10
 | |
|           env:
 | |
|             - name: GENERIC_TIMEZONE
 | |
|               value: US/Central
 | |
|             - name: DB_TYPE
 | |
|               value: postgresdb
 | |
|             - name: DB_POSTGRESDB_DATABASE
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: dbname
 | |
|             - name: DB_POSTGRESDB_HOST
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: host
 | |
|             - name: DB_POSTGRESDB_PORT
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: port
 | |
|             - name: DB_POSTGRESDB_USER
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: user
 | |
|             - name: DB_POSTGRESDB_PASSWORD
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: password
 | |
|             - name: N8N_METRICS
 | |
|               value: true
 | |
|             - name: QUEUE_HEALTH_CHECK_ACTIVE
 | |
|               value: true
 | |
|             - name: EXECUTIONS_MODE
 | |
|               value: queue
 | |
|             - name: QUEUE_BULL_REDIS_HOST
 | |
|               value: redis-replication-n8n-master.n8n
 | |
|             - name: N8N_ENCRYPTION_KEY
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-config-secret
 | |
|                   key: key
 | |
|             - name: WEBHOOK_URL
 | |
|               value: https://n8n.alexlebens.net/
 | |
|           probes:
 | |
|             liveness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|             readiness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz/readiness
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|           resources:
 | |
|             requests:
 | |
|               cpu: 10m
 | |
|               memory: 128Mi
 | |
|     webhook:
 | |
|       type: daemonset
 | |
|       revisionHistoryLimit: 3
 | |
|       pod:
 | |
|         nodeSelector:
 | |
|           kubernetes.io/arch: amd64
 | |
|       containers:
 | |
|         main:
 | |
|           image:
 | |
|             repository: ghcr.io/n8n-io/n8n
 | |
|             tag: 1.111.0
 | |
|             pullPolicy: IfNotPresent
 | |
|           command:
 | |
|             - n8n
 | |
|           args:
 | |
|             - webhook
 | |
|           env:
 | |
|             - name: GENERIC_TIMEZONE
 | |
|               value: US/Central
 | |
|             - name: DB_TYPE
 | |
|               value: postgresdb
 | |
|             - name: DB_POSTGRESDB_DATABASE
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: dbname
 | |
|             - name: DB_POSTGRESDB_HOST
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: host
 | |
|             - name: DB_POSTGRESDB_PORT
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: port
 | |
|             - name: DB_POSTGRESDB_USER
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: user
 | |
|             - name: DB_POSTGRESDB_PASSWORD
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-postgresql-17-cluster-app
 | |
|                   key: password
 | |
|             - name: N8N_METRICS
 | |
|               value: true
 | |
|             - name: QUEUE_HEALTH_CHECK_ACTIVE
 | |
|               value: true
 | |
|             - name: EXECUTIONS_MODE
 | |
|               value: queue
 | |
|             - name: QUEUE_BULL_REDIS_HOST
 | |
|               value: redis-replication-n8n-master.n8n
 | |
|             - name: N8N_ENCRYPTION_KEY
 | |
|               valueFrom:
 | |
|                 secretKeyRef:
 | |
|                   name: n8n-config-secret
 | |
|                   key: key
 | |
|             - name: WEBHOOK_URL
 | |
|               value: https://n8n.alexlebens.net/
 | |
|             - name: N8N_DIAGNOSTICS_ENABLED
 | |
|               value: false
 | |
|             - name: N8N_VERSION_NOTIFICATIONS_ENABLED
 | |
|               value: false
 | |
|           probes:
 | |
|             liveness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|             readiness:
 | |
|               enabled: true
 | |
|               custom: true
 | |
|               spec:
 | |
|                 httpGet:
 | |
|                   path: /healthz/readiness
 | |
|                   port: 5678
 | |
|                 initialDelaySeconds: 0
 | |
|                 periodSeconds: 10
 | |
|                 timeoutSeconds: 1
 | |
|                 failureThreshold: 3
 | |
|           resources:
 | |
|             requests:
 | |
|               cpu: 10m
 | |
|               memory: 128Mi
 | |
|   service:
 | |
|     main:
 | |
|       controller: main
 | |
|       ports:
 | |
|         http:
 | |
|           port: 80
 | |
|           targetPort: 5678
 | |
|           protocol: HTTP
 | |
|     worker:
 | |
|       controller: worker
 | |
|       ports:
 | |
|         http:
 | |
|           port: 80
 | |
|           targetPort: 5678
 | |
|           protocol: HTTP
 | |
|     webhook:
 | |
|       controller: webhook
 | |
|       ports:
 | |
|         http:
 | |
|           port: 80
 | |
|           targetPort: 5678
 | |
|           protocol: HTTP
 | |
|   persistence:
 | |
|     data:
 | |
|       storageClass: ceph-block
 | |
|       accessMode: ReadWriteOnce
 | |
|       size: 5Gi
 | |
|       advancedMounts:
 | |
|         main:
 | |
|           main:
 | |
|             - path: /data
 | |
|               readOnly: false
 | |
|     cache:
 | |
|       type: emptyDir
 | |
|       advancedMounts:
 | |
|         worker:
 | |
|           main:
 | |
|             - path: /home/node/.n8n
 | |
|               readOnly: false
 | |
|         webhook:
 | |
|           main:
 | |
|             - path: /home/node/.n8n
 | |
|               readOnly: false
 | |
| postgres-17-cluster:
 | |
|   mode: standalone
 | |
|   cluster:
 | |
|     storage:
 | |
|       storageClass: local-path
 | |
|     walStorage:
 | |
|       storageClass: local-path
 | |
|     monitoring:
 | |
|       enabled: true
 | |
|       prometheusRule:
 | |
|         enabled: true
 | |
|   recovery:
 | |
|     method: objectStore
 | |
|     objectStore:
 | |
|       endpointURL: https://nyc3.digitaloceanspaces.com
 | |
|       destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/n8n/n8n-postgresql-17-cluster
 | |
|       endpointCredentials: n8n-postgresql-17-cluster-backup-secret
 | |
|       recoveryIndex: 1
 | |
|   backup:
 | |
|     enabled: true
 | |
|     endpointURL: https://nyc3.digitaloceanspaces.com
 | |
|     destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/n8n/n8n-postgresql-17-cluster
 | |
|     endpointCredentials: n8n-postgresql-17-cluster-backup-secret
 | |
|     backupIndex: 1
 | |
|     retentionPolicy: "3d"
 |