feat(k8s): n8n
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: n8n-config
|
||||
namespace: n8n
|
||||
data:
|
||||
N8N_PORT: "5678"
|
||||
N8N_RUNNERS_ENABLED: "true"
|
||||
NODE_ENV: production
|
||||
GENERIC_TIMEZONE: Europe/Bratislava
|
||||
TZ: Europe/Bratislava
|
||||
N8N_SECURE_COOKIE: "false"
|
||||
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE: "true"
|
||||
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: "true"
|
||||
@@ -0,0 +1,47 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: n8n-prod
|
||||
namespace: n8n
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`n8n.forust.xyz`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: n8n-service
|
||||
port: 5678
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: n8n-local
|
||||
namespace: n8n
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`n8n.workstation.internal`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: n8n-service
|
||||
port: 5678
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: n8n-dev
|
||||
namespace: n8n
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`n8n.gigaforust.internal`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: n8n-service
|
||||
port: 5678
|
||||
@@ -0,0 +1,78 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: n8n-service
|
||||
namespace: n8n
|
||||
spec:
|
||||
selector:
|
||||
app: n8n
|
||||
ports:
|
||||
- port: 5678
|
||||
targetPort: 5678
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: n8n-deployment
|
||||
namespace: n8n
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: n8n
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: n8n
|
||||
spec:
|
||||
containers:
|
||||
- name: n8n
|
||||
image: docker.n8n.io/n8nio/n8n
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: n8n-config
|
||||
ports:
|
||||
- containerPort: 5678
|
||||
volumeMounts:
|
||||
- name: n8n-node-data
|
||||
mountPath: /home/node/.n8n
|
||||
- name: n8n-files
|
||||
mountPath: /files
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "150m"
|
||||
limits:
|
||||
memory: "5Gi"
|
||||
cpu: "1500m"
|
||||
volumes:
|
||||
- name: n8n-node-data
|
||||
persistentVolumeClaim:
|
||||
claimName: n8n-node-pvc
|
||||
- name: n8n-files
|
||||
persistentVolumeClaim:
|
||||
claimName: n8n-files-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: n8n-node-pvc
|
||||
namespace: n8n
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: n8n-files-pvc
|
||||
namespace: n8n
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: n8n
|
||||
Reference in New Issue
Block a user