113 lines
2.6 KiB
YAML
113 lines
2.6 KiB
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: n8n-data
|
|
namespace: n8n
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: openebs-hostpath-retain
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: n8n
|
|
namespace: n8n
|
|
labels:
|
|
app: n8n
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: n8n
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: n8n
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/os: linux
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: OnRootMismatch
|
|
containers:
|
|
- name: n8n
|
|
image: n8nio/n8n:2.5.2
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
env:
|
|
- name: N8N_HOST
|
|
value: n8n.lab2025.duckdns.org
|
|
- name: N8N_PORT
|
|
value: "5678"
|
|
- name: N8N_PROTOCOL
|
|
value: https
|
|
- name: WEBHOOK_URL
|
|
value: https://n8n.lab2025.duckdns.org/
|
|
- name: GENERIC_TIMEZONE
|
|
value: America/Mexico_City
|
|
- name: TZ
|
|
value: America/Mexico_City
|
|
- name: N8N_DIAGNOSTICS_ENABLED
|
|
value: "false"
|
|
- name: N8N_VERSION_NOTIFICATIONS_ENABLED
|
|
value: "false"
|
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
|
value: "true"
|
|
- name: N8N_RUNNERS_ENABLED
|
|
value: "true"
|
|
- name: OLLAMA_BASE_URL
|
|
value: http://192.168.100.68:11434
|
|
ports:
|
|
- containerPort: 5678
|
|
name: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 90
|
|
periodSeconds: 30
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 384Mi
|
|
limits:
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: n8n-data
|
|
mountPath: /home/node/.n8n
|
|
volumes:
|
|
- name: n8n-data
|
|
persistentVolumeClaim:
|
|
claimName: n8n-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: n8n
|
|
namespace: n8n
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: http
|
|
selector:
|
|
app: n8n
|