69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: n8n
|
||
|
|
namespace: n8n
|
||
|
|
labels:
|
||
|
|
app: n8n
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: n8n
|
||
|
|
replicas: 1
|
||
|
|
strategy:
|
||
|
|
rollingUpdate:
|
||
|
|
type: RollingUpdate
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: n8n
|
||
|
|
spec:
|
||
|
|
# initContainers:
|
||
|
|
# Init containers are exactly like regular containers, except:
|
||
|
|
# - Init containers always run to completion.
|
||
|
|
# - Each init container must complete successfully before the next one starts.
|
||
|
|
securityContext:
|
||
|
|
runAsUser: 1000
|
||
|
|
runAsGroup: 1000
|
||
|
|
fsGroup: 1000
|
||
|
|
|
||
|
|
containers:
|
||
|
|
- name: n8n
|
||
|
|
image: docker.n8n.io/n8nio/n8n:2.1.4
|
||
|
|
imagePullPolicy: IfNotPresent
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
memory: "500Mi"
|
||
|
|
cpu: "250m"
|
||
|
|
limits:
|
||
|
|
memory: "1Gi"
|
||
|
|
cpu: "500"
|
||
|
|
securityContext:
|
||
|
|
allowPrivilegeEscalation: false
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
envFrom:
|
||
|
|
- configMapRef:
|
||
|
|
name: n8n-config
|
||
|
|
- secretRef:
|
||
|
|
name: n8n-secret
|
||
|
|
|
||
|
|
ports:
|
||
|
|
- containerPort: 5678
|
||
|
|
name: n8n-port
|
||
|
|
volumeMounts:
|
||
|
|
|
||
|
|
- name: n8n-data
|
||
|
|
mountPath: /home/node/.n8n
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
- name: n8n-data
|
||
|
|
persistentVolumeClaim:
|
||
|
|
claimName: n8n-data
|
||
|
|
restartPolicy: Always
|
||
|
|
|
||
|
|
|